View Issue Details

IDProjectCategoryView StatusLast Update
0034463FPCPackagespublic2018-10-30 08:31
ReporterPetr-KAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionProduct Build#36503 
Target Version3.2.0Fixed in Version3.3.1 
Summary0034463: fcl-pdf: ttf CMap with one subtable - map is not loaded
DescriptionMicrosoft Sans Serif (micross.ttf) has only one subtable in CMap, table but is not loaded.

TTFFileInfo.ParseCmap:

  UE:=FCMapH.SubtableCount-1; //FCMapH.SubtableCount=1 => UE=0
  if UE=0 then
     // No CMap subtable entries, this is not an error, just exit.
     exit;

Patch is included.
TagsNo tags attached.
Fixed in Revision40054
FPCOldBugId
FPCTarget
Attached Files
  • fpparsettf.patch (564 bytes)
    Index: packages/fcl-pdf/src/fpparsettf.pp
    ===================================================================
    --- packages/fcl-pdf/src/fpparsettf.pp	(revision 39553)
    +++ packages/fcl-pdf/src/fpparsettf.pp	(working copy)
    @@ -532,7 +532,7 @@
         FSubtables[i].Offset:=ReadUInt32(AStream); // 4 bytes - Offset of subtable
         end;
       UE:=FCMapH.SubtableCount-1;
    -  if UE=0 then
    +  if UE=-1 then
         // No CMap subtable entries, this is not an error, just exit.
         exit;
       While (UE>=0) and ((FSubtables[UE].PlatformID<>3) or (FSubtables[UE].EncodingID<> 1)) do
    
    fpparsettf.patch (564 bytes)

Activities

Petr-K

2018-10-26 15:32

reporter  

fpparsettf.patch (564 bytes)
Index: packages/fcl-pdf/src/fpparsettf.pp
===================================================================
--- packages/fcl-pdf/src/fpparsettf.pp	(revision 39553)
+++ packages/fcl-pdf/src/fpparsettf.pp	(working copy)
@@ -532,7 +532,7 @@
     FSubtables[i].Offset:=ReadUInt32(AStream); // 4 bytes - Offset of subtable
     end;
   UE:=FCMapH.SubtableCount-1;
-  if UE=0 then
+  if UE=-1 then
     // No CMap subtable entries, this is not an error, just exit.
     exit;
   While (UE>=0) and ((FSubtables[UE].PlatformID<>3) or (FSubtables[UE].EncodingID<> 1)) do
fpparsettf.patch (564 bytes)

Michael Van Canneyt

2018-10-27 16:37

administrator   ~0111617

Checked and applied the patch, thank you!

Issue History

Date Modified Username Field Change
2018-10-26 15:32 Petr-K New Issue
2018-10-26 15:32 Petr-K File Added: fpparsettf.patch
2018-10-26 16:43 Michael Van Canneyt Assigned To => Michael Van Canneyt
2018-10-26 16:43 Michael Van Canneyt Status new => assigned
2018-10-27 16:37 Michael Van Canneyt Fixed in Revision => 40054
2018-10-27 16:37 Michael Van Canneyt Note Added: 0111617
2018-10-27 16:37 Michael Van Canneyt Status assigned => resolved
2018-10-27 16:37 Michael Van Canneyt Fixed in Version => 3.3.1
2018-10-27 16:37 Michael Van Canneyt Resolution open => fixed
2018-10-27 16:37 Michael Van Canneyt Target Version => 3.2.0
2018-10-30 08:31 Petr-K Status resolved => closed