[Openfontlibrary] david berlow on screen type
James Cloos
cloos+fd-openfontlibrary at jhcloos.com
Thu Mar 8 14:21:17 PST 2007
>>>>> "Stephen" == Stephen Hartke <hartke at gmail.com> writes:
Stephen> In general, it was not a problem with ftconfig and xft
Stephen> finding the font; the problem was that garbage would be
Stephen> displayed.
I had that problem at one point with everything I converted to
opentype bitmap format (any flavour of bitmap in sfnt).
But I just mucked around with my config and tested on of those gbf
files I had. Looks OK in ftview, corrupt in xfd....
The only obvious thing I found is that fc-cat shows that fc-cache
thinks it is a bitmap rather than a greymap:
,----
| "UNI_4.bdf" 0 "unigfont-16:style=Regular:slant=0:weight=80
| :width=100:pixelsize=16:spacing=110:foundry=jhc
| :antialias=False:index=0:outline=False:scalable=False
| :dpi=75:...:fontversion=0:fontformat=BDF:decorative=False"
`----
(I elided only the :charset and :lang attributes.)
Notice the :altialias=False.
fontconfig/src/fcfreetype.c has this:
,----(partially elided and re-formated excerpt)
| if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) {
| // elided
| if (!FcPatternAddBool (pat, FC_ANTIALIAS, FcFalse))
| goto bail2;
`----
That of course prevents any GDF from having FC_ANTIALIAS==FcTrue.
There are probably similar presumptions elsewhere, as well as in Xft,
cairo, et al. They'll need to be patched to recognise a BDF with a
depth!=1 as a greymap and display it accordingly.
Somehow I thought that was already the case, but I see that it is not.
Stephen> I've posted the file on my webpage for you to access:
Stephen> http://www.geocities.com/hartke01/FixedGrayMedium.bdf.tgz
I'll grab it tonight; thanks.
Stephen> Note that only the diagonals in the ASCII section have been
Stephen> grayscaled. "7" is a pretty good test character.
That was what I tried to do, too. My intent was to simulate the look
of well-instructed single-pixel-stem ttf fonts as displayed AA by Xft.
-JimC
--
James Cloos <cloos at jhcloos.com> OpenPGP: 1024D/ED7DAEA6
More information about the Openfontlibrary
mailing list