xforms-development
[Top][All Lists]
Advanced

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

Re: [XForms] Fonts used by Xforms on recent Fedora


From: Serge Bromow
Subject: Re: [XForms] Fonts used by Xforms on recent Fedora
Date: Thu, 06 May 2010 11:43:57 -0400
User-agent: Thunderbird 2.0.0.24 (X11/20100228)



Marcus D. Leech wrote:
Anyone know which *specific* font packages I need on a Fedora system to
get XForms-based
  applications to render correctly-sized text?

On a "default" F11 and F12 installation, the text sizes are
wrong--spilling outside of their containing
  objects, etc.

If I do a "yum install "*fonts*" the problem goes away, but I don't know
*which* fonts actually fix the  
   problem--that install installs about 280 different font packages, and
I'm pretty-sure they can't
  *all* be necessary for Xforms to render text appropriately :-)

My first thought was the "xorg-x11-fonts*" fonts, but they don't appear
to be the ones (removing them
  doesn't cause text rendering to suddenly be broken again).

Any clues?

  
Hi Marcus,

Yes indeed this is a problem that has plagued me for some time. It would appear that we Fedora folk are the victims of cruel font joke.

Take a look at "http://www,dineamix.ca/xforms". These images show the different font rendering in Fedora 5 vs Ubuntu 10.4 which uses the same font handling method as Fedora 10 and forward.

Obviously they are not the same size and they create havoc with applications being ported to various operating system (see last pictures).

In my case I use RedHat 7.3 and Fedora 5 operating systems and both use the font server approach. In the "/etc/X11/fs/config" file show here note that the 75 dpi font is listed before the 100 dpi and the 75dpi is favoured in the default-resolution statement.
//--------------------------------------------------
catalogue = /usr/share/X11/fonts/misc:unscaled,
        /usr/share/X11/fonts/75dpi:unscaled,
        /usr/share/X11/fonts/100dpi:unscaled,
        /usr/share/X11/fonts/Type1,
        /usr/share/fonts/default/Type1,
        /usr/share/fonts/msttcorefonts,

# 100 x 100 and 75 x 75
default-resolutions = 75,75,100,100
// --------------------------------------------------

So a call for Helvetica/Courier/Times  fonts returns the 75dpi font first and all is well on our screens.

Simply adding the font server package (xfs) can fix the problem in the Fedora 10 and on. Simply ensure the 75dpi fonts are specified before the 100dpi.

No need for more fonts since these fonts are the most common X server/Postscript fonts and are always installed in an X11 environment.

Having said that, the font server approach does not seem to work in Ubuntu because these fonts are compiled into the X server and you will always get those fonts before anything you specify later.

Here is the Ubuntu X server log. Note the built in part and the 100dpi order;
//---------------------------------------------------
(WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
        Entry deleted from font path.
(==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/100dpi/:unscaled,
        /usr/share/fonts/X11/75dpi/:unscaled,
        /usr/share/fonts/X11/Type1,
        /usr/share/fonts/X11/100dpi,
        /usr/share/fonts/X11/75dpi,
        /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType,
        built-ins
//-------------------------------------------------------

Same problem. We get the 100dpi and our apps look funny.

Enough history, here is the solution;

you can edit the "forms-source/lib/fonts.c" file and change the entries below to force 75dpi.

// Original -----
 "-*-helvetica-medium-r-*-*-*-?-*-*-p-*-*-*",
    "-*-helvetica-bold-r-*-*-*-?-*-*-p-*-*-*",
    "-*-helvetica-medium-o-*-*-*-?-*-*-p-*-*-*",
    "-*-helvetica-bold-o-no*-*-*-?-*-*-p-*-*-*",

    "-*-courier-medium-r-*-*-*-?-*-*-m-*-*-*",
    "-*-courier-bold-r-*-*-*-?-*-*-m-*-*-*",
    "-*-courier-medium-o-*-*-*-?-*-*-m-*-*-*",
    "-*-courier-bold-o-*-*-*-?-*-*-m-*-*-*",

    "-*-times-medium-r-*-*-*-?-*-*-p-*-*-*",
    "-*-times-bold-r-*-*-*-?-*-*-p-*-*-*",
    "-*-times-medium-i-*-*-*-?-*-*-p-*-*-*",
    "-*-times-bold-i-*-*-*-?-*-*-p-*-*-*",

// Changed ---------------------------------------
   "-*-helvetica-medium-r-*-*-*-?-*-75-p-*-*-*",
    "-*-helvetica-bold-r-*-*-*-?-*-75-p-*-*-*",
    "-*-helvetica-medium-o-*-*-*-?-*-75-p-*-*-*",
    "-*-helvetica-bold-o-no*-*-*-?-*-75-p-*-*-*",

    "-*-courier-medium-r-*-*-*-?-*-75-m-*-*-*",
    "-*-courier-bold-r-*-*-*-?-*-75-m-*-*-*",
    "-*-courier-medium-o-*-*-*-?-*-75-m-*-*-*",
    "-*-courier-bold-o-*-*-*-?-*-75-m-*-*-*",

    "-*-times-medium-r-*-*-*-?-*-75-p-*-*-*",
    "-*-times-bold-r-*-*-*-?-*-75-p-*-*-*",
    "-*-times-medium-i-*-*-*-?-*-75-p-*-*-*",
    "-*-times-bold-i-*-*-*-?-*-75-p-*-*-*",

Recompile and all is well again.

Second approach is to restate the fonts to be used in your application with;

fl_set_font_name(FL_NORMAL_STYLE,"-adobe-helvetica-medium-r-*-*-*-?-*-75-*-*-*-*");

and so on.

That's it.

Oh and of course you can recompile the Xserver and... Oh forget it.

Anyone using Debian/Ubuntu and other OS's would never have experience this problem since they choose fonts from their pallet that fit using the 100dpi fonts without knowing the difference.

Can you believe I have been in the 75dpi world for over 10 years and didn't know it.

Go figure!!!

Serge



--
Serge Bromow
DineAmix Inc.
<address@hidden>
(613) 260-8629
888 411-6636
Ottawa, Canada.



IMPORTANT NOTICE: This message is intended only for the use of the individual or entity to which it is addressed. The message may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify DineAmix Inc. immediately by email at address@hidden.

Thank you. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]