Bug 9092 - maxComponentDepth value in maxp table is incorrect in fonts
Summary: maxComponentDepth value in maxp table is incorrect in fonts
Status: ASSIGNED
Alias: None
Product: DejaVu
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: x86 (IA32) All
: high major
Assignee: Denis Jacquerye
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-20 01:10 UTC by Roozbeh Pournader
Modified: 2013-03-15 14:25 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
script to find the longest list of glyphs referencing each other (910 bytes, text/plain)
2006-11-26 03:23 UTC, Roozbeh Pournader
Details

Description Roozbeh Pournader 2006-11-20 01:10:57 UTC
There are problems in the maxComponentDepth field in the maxp table. The field
is defined defined according to the following part of OpenType spec:

http://www.microsoft.com/OpenType/OTSpec/maxp.htm

For the field, the spec says "Maximum levels of recursion; 1 for simple components."

This means that if a font doesn't use references the value should be one, but if
it does, for each level, one should add one to the value. All DejaVu fonts
currently have "4" in the field.

The MS Font Validator tool generates an error about the field, saying that based
on its computations, the value should be 6. From my own computations, it should
be at least 5 for DejaVu fonts. For DejaVuSans, for example, the following
sequence can be found:

uni1F92 -> uni1F22 -> uni1FCD -> uni1FEF -> grave

If the rendering systems actually use this value, this will result in problems
rendering the fonts.
Comment 1 Ben Laenen 2006-11-20 04:17:03 UTC
ah, so that was causing that! I had that problem once with invisible glyphs in 
the Greek Extended block, and I couldn't figure out why, and thought I did 
something very wrong with so many recursions. But I have again the impression 
I can't set that maxComponentDepth value -- it's not showing in the maxp 
settings window. Going to investigate this further later today.
Comment 2 Denis Jacquerye 2006-11-22 13:22:59 UTC
We could add 
  $font->{'maxp'}->{'maxComponentDepth'} = 5;
to ttpostproc.pl

Should it be 5 or 6?

see
http://cpan.uwinnipeg.ca/htdocs/Font-TTF/Font/TTF/Maxp.pm.htm
Comment 3 Roozbeh Pournader 2006-11-22 13:49:36 UTC
(In reply to comment #2)
> Should it be 5 or 6?

Well, the MS tool tells me "6" for all the fonts but SansExtraLight, and "7" for
SansExtraLight. But a tool I've written (which may be buggy) can't find anything
longer than 5.
Comment 4 Roozbeh Pournader 2006-11-22 13:51:24 UTC
(In reply to comment #3)
> But a tool I've written (which may be buggy) can't find anything
> longer than 5.

I can post the script here, of course.
Comment 5 Denis Jacquerye 2006-11-25 12:10:18 UTC
(In reply to comment #4)
> I can post the script here, of course.
Yes, if that's no problem for you. We can have a look and use it :-).
Comment 6 Roozbeh Pournader 2006-11-26 03:23:59 UTC
Created attachment 7901 [details]
script to find the longest list of glyphs referencing each other

Attaching the script I wrote to compute the longest list. It takes a TTX file
as the input and outputs first the length of the longest sequence it finds and
then the sequence with their components. May have bugs.
Comment 7 chemtech 2013-03-15 14:25:39 UTC
Roozbeh Pournader
Do you still experience this issue with newer soft ?
Please check the status of your issue.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.