NRajkumar / pdfium

Automatically exported from code.google.com/p/pdfium
0 stars 0 forks source link

True Type Fonts Not Always Parsed Correctly #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open Any PDF with a true type font which has been encoded similar to the 
following 
<</Type/FontDescriptor/FontName/IOVEMJ+Junicode-Italic/FontBBox[-67 -272 437 
727]/Flags 131076
/Ascent 727
/CapHeight 727
/Descent -272
/ItalicAngle 0
/StemV 65
/MissingWidth 500
/XHeight 527
/FontFile2 295 0 R>>

2. Attempt to read information about the font from 
FPDF_CHAR_INFO.m_pTextObj->GetFont()

What is the expected output? What do you see instead?
Expect to see a font with all the relevant information filled out but instead 
the metadata such as font name and style are blank. When Opening a file encoded 
like this:

<</Type/FontDescriptor/FontName/BAAAAA+Calibri-Italic
/Flags 68
/FontBBox[-724 -275 1258 1013]/ItalicAngle -30
/Ascent 952
/Descent -268
/CapHeight 1013
/StemV 80
/FontFile2 7 0 R
>>

It works correctly. This leads me to believe it is a problem in the parsing. 

What version of the product are you using? On what operating system?
PDFium is at commit 9108ad211bf00d6e512af0919b743c1bf8b0eeb8
Running on Ubuntu 14.04

Original issue reported on code.google.com by bwi...@gmail.com on 1 Jul 2014 at 12:21

GoogleCodeExporter commented 9 years ago
The command pdffonts reads the font data correctly from the file. 

Original comment by bwi...@gmail.com on 1 Jul 2014 at 12:28