Re: How does Dia determine Font List?



On 03 Jul 2002 18:42:34 -0500
Lars Clausen <lrclause cs uiuc edu> wrote:

It's as though Dia has hardcoded a list of fonts assumed to exist on
XFree86 systems...???

Funny you should mention it...

dia-0.90/lib/font.c:
FontData font_data[] = {
  { "Times-Roman",
    "Times-Roman",
    { "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*",
      NULL
    },
    "Times New Roman", "Regular"
  }, 
  { "Times-Italic",

ARG!

The list includes the standard list of PostScript fonts, plus a few
fonts in other charsets that are also fairly common in those areas. 
This is so that we can do PostScript printing without embedding all
chars as bitmaps(for that is all you could get from an X font server).

Seems a common Xfont-->PostScript table could be built and if no map
exists, prod the user to either provide a PostScript equivalent or warn
them this'll increase the size of their .ps file dramatically.

In the CVS version, as you may see in the archives from a few weeks
back, we have changed to rely on Pango (GTK2) for our font listing,
dynamically adding fonts to the menu as the user selects them.  Much,
much better.  But then, Pango allows us to get the outlines we need to
do PostScript printing (which seems to be the next part up).

So this means even if the font isn't a standard PostScript font, that you
can include the font as not too much a size increase on the .ps?

I guess I don't understand the Pango outline/postscript issues so much.
The main problem I consider myself having is to clear four dialogue boxes
about nonexistent fonts upon diagram load and the fact that all diagrams
always use Courier font despite the fact that the printout changes.

I assume you're saying these two issues disappear once CVS version becomes
Dia 0.95 or whatever the next version shall be?

--
Tim Ellis
DBA, Gamet



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]