Re: [gtk-i18n-list] `.pcf' font not accessible from pango



Hi,

On Sun, 8 Jan 2006 17:58:15 +0100
pottendo <pottendo utanet at> wrote:
>> On Mon, 2 Jan 2006 15:26:34 +0100
>> pottendo <pottendo utanet at> wrote:
>> >I'm trying to migrate an application from GTK 1.x to GTK 2.x (Vice,
>> >http://www.viceteam.org). 
>> >This applications uses some handcrafted font which works well within
>> >an X11 environment. The source of the font is .bdf which is compiled
>> >with bdftopcf into .pcf format.

>> I suppose, your gtk+-2.6.x backend is xft, you should check
>> "fc-cache" command to get a list of the font xft library
>> recognizes.
>
>With fc-cache I managed to create a file `fonts.cache-1'; but only
>after copying the font source file `vice-cbm.bdf' to my fontdir
>(/usr/local/lib/vice/fonts).  
>The content is:
>  "vice-cbm.bdf" 0 "VICE CBM:style=Regular:slant=0:weight=80:width=100:pixelsize=12:spacing=100:foundry=FreeType:antialias=False:index=0:outline=False:scalable=False:charset=:lang=:fontversion=0"
>
>Now `VICE CBM' appears in the fontselector widget (vice-cbm.bdf gets
>loaded; checked with strace)

Good.

>but choosing the font is not showing my CBM font but probably default
>`Sans'.

Hmm. Any BDF/PCF fonts are usable in your GTK2 application?
All BDF/PCF fonts are ignored (and fallback to other fonts)?

>> >Also other applications using the fontselector widget don't show my
>> >CBM font. I also tried to add the fontpath to my ~/.fonts.config which
>> >didn't change anything.
>> 
>> I'm unfamiliar with ~/.fonts.config - Who told you as it's
>> helpful?
>
>What's the best way to supply an application specific font?

Umm, I have no idea. I'm afraid that Pango has no backends
that works with specific application, and no way to pass
application specific informations to backends. Furthermore,
I'm afraid that it's difficult (or impossible?) to bind
suitable backend per applications (e.g. Mozilla uses Cairo
backend, GAIM uses XFT backend, etc etc). So, if someone
wants to show application-specific font in the font menu of
his application, he may have to write font menu widget from
scratch, without pango, without font-config.

>In my case the font is special and not be useful for any
>other application. The mapping is special (petscii and
>not ascii) and very specific symbolic characters are supplied.
>However for the application it makes sense to have this font
>(disk image preview, etc.).

Umm, It makes me afraid about the font can cause problems
when it's accessed via Unicodized libraries, like font-config,
XFT and Pango.

Regards,
mpsuzuki



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