Re: [ft] CFF_MAX_CID_FONTS

2010-12-31 Thread Werner LEMBERG
 Does anyone know why CFF_MAX_CID_FONTS (maximum number of sub-fonts
 in a CID-keyed file) is 32 in cfftypes.h?

It's arbitrary.  Up to now I've never seen a font with more than 15
subfonts (hiragino).

 I'm using a font in which fd_index.count == 53 [...]

 Changing CFF_MAX_CID_FONTS to 64 seems to solve the problem.

Changed in git.  Thanks for the report.


Happy New Year to all of you!


Werner

___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] CFF_MAX_CID_FONTS

2010-12-31 Thread James Cloos
 TBWI == Tom Bishop, Wenlin Institute wen...@wenlin.com writes:

TBWI Does anyone know why CFF_MAX_CID_FONTS (maximum number of
TBWI sub-fonts in a CID-keyed file) is 32 in cfftypes.h? I'm using a
TBWI font in which fd_index.count == 53 and triggers the following
TBWI error in cffload.h:

TBWI   if ( fd_index.count  CFF_MAX_CID_FONTS )
TBWI   {
TBWI FT_TRACE0(( cff_font_load: FD array too large in CID font\n ));

TBWI Changing CFF_MAX_CID_FONTS to 64 seems to solve the problem. I'd
TBWI like to know (1) whether the number 32 is based on a
TBWI specification, or if it's arbitrary, and (2) whether changing it
TBWI to 64 is liable to cause any problem.

A quick check shows that:

  Werner pushed it from 15 to 32 seven years ago

  It is used to statically size two arrays

So the only reason to keep it small is to avoid wasting memory.

It looks like those arrays end up holding pointers, though, so the extra
memory use should be tiny.

Pushing it to 64 to accommodate larger fonts should not be problematic.

-JimC
-- 
James Cloos cl...@jhcloos.com OpenPGP: 1024D/ED7DAEA6

___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype