• Michael Stahl's avatar
    rhbz#1177022: vcl: fix PDF embedding of Type 1 fonts · 5183910a
    Michael Stahl yazdı
    Problem is that for the "CM Typewriter" font the Width for "space" (32)
    is exported as 0 instead of 525, which is the correct value in the AFM.
    
    The reason is that PDFWriterImpl::emitEmbeddedFont() has various arrays
    to map from font code points to Unicode code points, and there are
    duplicate mappings, so the 160->32 mapping overrides 32->32.
    
    The PrintFontManager::PrintFont::readAfmMetrics() actually creates a
    Unicode to font code mapping (which may legitimately be n:1) that is
    then inverted; add an additional hack to store a set of "preferred"
    Unicodes so that PDFWriterImpl can pick the right Unicode.
    
    Presumably the code that is stored explicitly via "C" or "CH" in the
    AFM should take priority over more generic mappings.
    
    Change-Id: Id4205a1cd45ba6a0a5facee1e39f70c3535e7dd4
    5183910a
salgdi.cxx 25.6 KB