Discussion:
[Fontforge-users] How to apply kerning to bitmap font generated from fontforge to be used by Firefox
ffnewbie1
2012-01-02 02:01:15 UTC
Permalink
It seems .bdf file cannot have kerning info saved with it. And fontforge
cannot generate .pcf file. I am able to embed bitmap font into .ttf with
kerning, or save bitmap font with kerning in .otb file in Fontforge. But
the Mozilla Firefox either does not use the embedded bitmap font in the .ttf
case, or does not apply kerning in .otb case.

Is there a way to apply kerning in bitmap font and allow firefox to use both
bitmap and the kerning? The current font generation tool I have is only
fontforge. Is it doable with fontforge? Or any other font tool can serve
my needs?
--
View this message in context: http://old.nabble.com/How-to-apply-kerning-to-bitmap-font-generated-from-fontforge-to-be-used-by-Firefox-tp33047122p33047122.html
Sent from the Fontforge - User mailing list archive at Nabble.com.
Khaled Hosny
2012-01-02 13:35:28 UTC
Permalink
Post by ffnewbie1
It seems .bdf file cannot have kerning info saved with it. And fontforge
cannot generate .pcf file. I am able to embed bitmap font into .ttf with
kerning, or save bitmap font with kerning in .otb file in Fontforge. But
the Mozilla Firefox either does not use the embedded bitmap font in the .ttf
case, or does not apply kerning in .otb case.
Using embedded bitmaps in TTF is controlled by fontconfig, and it might
be configured in your system to not use embedded bitmaps. You may need
to do the reverse of this:
http://askubuntu.com/questions/21097/configure-fontconfig-to-ignore-bitmaps-in-scalable-fonts
(i.e true instead of false)

If this does not work, then make sure you ave embedded bitmaps for the
font sizes you are using.

Regards,
Khaled
ffnewbie1
2012-01-03 05:19:48 UTC
Permalink
Post by Khaled Hosny
Using embedded bitmaps in TTF is controlled by fontconfig, and it might
be configured in your system to not use embedded bitmaps. You may need
http://askubuntu.com/questions/21097/configure-fontconfig-to-ignore-bitmaps-in-scalable-fonts
(i.e true instead of false)
If this does not work, then make sure you ave embedded bitmaps for the
font sizes you are using.
Regards,
Khaled
Thank you very much for the reply. I added lines to allow embedded bitmap
in my local fonts.conf, and the font size I used is also one of the
available sizes that I generated from fontforge. I generated a .ttf file,
in which embedded 4 sizes (10,12,14,30px) of bitmap fonts by fontforge
(followed the instruction in
http://fontforge.sourceforge.net/editexample8.html#Creating =>Creating
Bitmap Strikes). I modified the bitmap font strikes for the letter "T" (for
all 4 sizes) to be looked like something close to "F" so that I can tell if
it's indeed rendering the bitmap font instead of the true type font. To my
supprize, only size 10 used the bitmap font. Then I tried to produce
another bitmap embedded ttf file by repeating the font creating procedure
but only embed 10, 12, 14 or some other sizes. I never got any success.
The fontconfig stays the same. Now I'm a little confused. If I never got
anything work, I may just give up. But it seems I'm very close now...
--
View this message in context: http://old.nabble.com/How-to-apply-kerning-to-bitmap-font-generated-from-fontforge-to-be-used-by-Firefox-tp33047122p33069868.html
Sent from the Fontforge - User mailing list archive at Nabble.com.
Khaled Hosny
2012-01-03 13:04:35 UTC
Permalink
Post by ffnewbie1
Post by Khaled Hosny
Using embedded bitmaps in TTF is controlled by fontconfig, and it might
be configured in your system to not use embedded bitmaps. You may need
http://askubuntu.com/questions/21097/configure-fontconfig-to-ignore-bitmaps-in-scalable-fonts
(i.e true instead of false)
If this does not work, then make sure you ave embedded bitmaps for the
font sizes you are using.
Regards,
Khaled
Thank you very much for the reply. I added lines to allow embedded bitmap
in my local fonts.conf, and the font size I used is also one of the
available sizes that I generated from fontforge. I generated a .ttf file,
in which embedded 4 sizes (10,12,14,30px) of bitmap fonts by fontforge
(followed the instruction in
http://fontforge.sourceforge.net/editexample8.html#Creating =>Creating
Bitmap Strikes). I modified the bitmap font strikes for the letter "T" (for
all 4 sizes) to be looked like something close to "F" so that I can tell if
it's indeed rendering the bitmap font instead of the true type font. To my
supprize, only size 10 used the bitmap font. Then I tried to produce
another bitmap embedded ttf file by repeating the font creating procedure
but only embed 10, 12, 14 or some other sizes. I never got any success.
The fontconfig stays the same. Now I'm a little confused. If I never got
anything work, I may just give up. But it seems I'm very close now...
I think the dpi you are using might affect how point sizes are mapped to
bitmap strikes, by default Gnome used 96dpi but I'm not sure what dpi
Firefox is using as it does not seem to respect system settings here.

Regards,
Khaled
ffnewbie1
2012-01-03 19:40:53 UTC
Permalink
Post by Khaled Hosny
If this does not work, then make sure you ave embedded bitmaps for the
font sizes you are using.
Regards,
Khaled
Finally i find out that the zoom setting in my firefox causes the problem!

Once it's in the zoom-in view, it will never reset automatically even the
brower was reopened. And the size telling by the addon fontfinder is not
the actual rendering size, but just the size set in the style. Once I
reset the zoom, everything works just great!

Thanks for all the help! You were right. I was not looking at the same
size that I made for my bitmap font.
--
View this message in context: http://old.nabble.com/How-to-apply-kerning-to-bitmap-font-generated-from-fontforge-to-be-used-by-Firefox-tp33047122p33074376.html
Sent from the Fontforge - User mailing list archive at Nabble.com.
Khaled Hosny
2012-01-03 19:54:40 UTC
Permalink
Post by ffnewbie1
Post by Khaled Hosny
If this does not work, then make sure you ave embedded bitmaps for the
font sizes you are using.
Regards,
Khaled
Finally i find out that the zoom setting in my firefox causes the problem!
Once it's in the zoom-in view, it will never reset automatically even the
brower was reopened. And the size telling by the addon fontfinder is not
the actual rendering size, but just the size set in the style. Once I
reset the zoom, everything works just great!
Thanks for all the help! You were right. I was not looking at the same
size that I made for my bitmap font.
Great, glade that my little advice helped :)

Regards,
Khaled

ffnewbie1
2012-01-03 19:43:52 UTC
Permalink
Post by Khaled Hosny
If this does not work, then make sure you ave embedded bitmaps for the
font sizes you are using.
Regards,
Khaled
Finally i find out that the zoom setting in my firefox causes the problem!

Once it's in the zoom-in view, it will never reset automatically even the
brower was reopened. And the size telling by the addon fontfinder is not
the actual rendering size, but just the size set in the style. Once I
reset the zoom, everything works just great!

Thanks for all the help! You were right. I was not looking at the same
size that I made for my bitmap font.
--
View this message in context: http://old.nabble.com/How-to-apply-kerning-to-bitmap-font-generated-from-fontforge-to-be-used-by-Firefox-tp33047122p33074402.html
Sent from the Fontforge - User mailing list archive at Nabble.com.
Loading...