From: Kevin K. <ke...@ac...> - 2008-12-16 03:53:59
|
Donal K. Fellows wrote: > At a guess, this either was part of Tk 4.0 (as far back as I can > remember there font name tricks being about) or came in with the new > font system (don't remember when that happened). If memory serves, it is > needed because font family names can be specified at the script level as > all lower-case (common with names from XLFDs). > > I'm hesitant to change this code, not because I think what it does is > right, but rather because I don't have any feeling at all for who and > what would be affected. Forcing people to use a workaround who > previously did not need to... that's a good way to get people to accuse > you of breaking things unnecessarily. Arguably we missed the boat earlier, but I've long thought that we *should* have repaired the default font mapping when we upgraded the [$canvas postscript] command to do %%IncludeResource. Unfortunately, we didn't get the latter quite right, which is why font mapping is still needed - or so it appears. If I recall correctly, if I have a font in my catalog named, "Caslon Nº 224 MT" (as in fact I do)... what do I do? Tk unquestionably does not get this right, but my native system's word processor somehow manages to find CaslonTwoTwentyFour or whatever the PS font name is, and get the resources straight. That's arguably the layer we should be attacking first. If we can get that, we solve the problem for Windows, MacOSX and X11+Xft, leaving X11 without Xft the only odd man out. I'd love to have the "workaround" for the "bug" introduced by not screwing up the case in the font name be, "oh, just leave out the -fontmap, the system can figure things out correctly without it." So, in short, Donal has the right of it (don't break things gratuitously), but Jan and Alex have a deeper underlying rightness (it's mostly ok to break things that are already broken if you can fix them in the process). It's an odd system that actually still requires font mapping... except that most PostScript-generating Tk programs do, because we get things horribly wrong without it. While we're on this topic, I've another question in my ignorance. Is there an external way to resolve the %%IncludeResource directives so that I can embed fonts when it's lawful to do so? It would be really nice to be able to carry my PostScript over to a different system and have fonts like Nimbus or Andale Mono come with it. -- 73 de ke9tv/2, Kevin |