[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] BDF chars with ENCODING > 65536
From: |
Werner LEMBERG |
Subject: |
Re: [ft] BDF chars with ENCODING > 65536 |
Date: |
Thu, 06 Dec 2007 08:55:47 +0100 (CET) |
> In freetype/src/bdf/bdflib.c I see: [...]
>
> Which seems to prevent a BDF containing chars with ENCODING values
> > 65536 from being opened.
This is correct.
> I have some BDF data which includes such characters, and would like
> to enable FreeType to use them.
I also have a single such font (cccii64.bdf, which has 89MByte), and
I've never seen another one. BTW, fontforge opens this font without
any problems.
> Seeing as how the comment above indicates a relationship with
> p->have, it seems unwise to simply increase the cutoff for the test
> (i.e. change "* 8" to something larger). So I'm wondering, if one
> were desirous of modifying bdflib.c (and whatever other dependencies
> necessary), what is the best approach?
Do you really think that this is of any use today? There are much
better font formats than BDF, even for bitmaps!
> My perhaps naïve idea is to change the above to:
> if ( (size_t)p->glyph_enc >= sizeof ( p->have ) * 136 )
>
> And as well modify 'have' of the _bdf_parse_t structure as:
> unsigned long have[34816]; /* was: have[2048] */
This seems like a sensible starting point, and I invite you to
contribute such changes to FreeType. Note, however, that this static
extension must be controlled by an #ifdef in ftoption.h and disabled
by default, I think. Alternatively, you might go a more complicated
route, namely, to replace the static `have' structure with a dynamic
one -- this would be a good idea anyway and could be included without
such an #ifdef guard.
Werner
- Re: [ft] BDF chars with ENCODING > 65536,
Werner LEMBERG <=