https://bugs.documentfoundation.org/show_bug.cgi?id=151039

--- Comment #5 from خالد حسني <[email protected]> ---
(In reply to Mike Kaganski from comment #4)
> (In reply to خالد حسني from comment #3)
> 
> Yes, and maFontBBox is empty, with the code above (line 475) never executed
> when preparing. My question is rather what would be the correct way to
> calculate the bounding box when it's absent in the font - should it be
> generated from the exported subset, and how?
> 
> For now, I'm going to use the same approach that was used in line 1835 -
> i.e., use a default set when the size of the matrix is not 4.

I’d do the simple thing and output an all 0's one, garbage in, garbage out.

A slightly better fix is to use the equivalent font extents from head table,
but this particular code has access to the CFF table only and not the rest of
the font tables, so that is not easy to pull (CFF table was shoehorned to
OpenType, it is a standalone font format and duplicate some data available
elsewhere in OpenType and the code here is written on the assumption accessing
CFF table is enough, which is generally true).

Calculating extents from the glyphs is slow, so I wouldn’t do this.

The issue should be reported to the font developers as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to