Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.1
-
Fix Version/s: 5.0.1
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:any
-
Salesforce Case Reference:
Description
The file in question has title/section text which should be drawn as plain white text. Instead ICEpdf is stroking with white correctly but filling with black incorrectly. The file can't be uploaded do to confidentiality.
Spent a bit of time looking into this one. The first problem is related to the new ContentParser that is created to parse the Type3 glyph. This new content parser has no visiblity to the parent graphics context and thus will always have the default black color defined in a new Graphics state. The good news is that that the TextSprite has this information has this information and can be passed into the font when the drawEstring() is called.
The second problem here is that we use glph cache to try and speed up the paint time. This cache is indexed by the character name/number which doesn't take into account if a glyph is painted using a different fill color. Once again not to terrible a problem as we can change up the key to take into account the fill color.