Coder Social home page Coder Social logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 15, 2024
Turns out the problem is not that DOMPDF was treating the value of font-family 
as a
single font name. Upon exception DOMPDF was reporting the value of font-family 
as
written. While processing of the list, however, DOMPDF was correctly parsing the
string and attempting to match each individual entry to a font mapping. The 
problem
was that after exploding the font-family string the resulting array of 
alternatives
were not at any point trimmed. This resulted in leading spaces for entries 
after the
first font.

To fix this I used array_map() to pass each value to trim. See
style.cls.php@get_font_family().

Note: We might also consider using trim in font_metrics.cls.php@get_font() to 
further
ensure the font is read correctly. I don't imagine there are many (any) font 
names
with a leading or trailing space.

Original comment by eclecticgeek on 3 Jun 2009 at 5:01

  • Changed state: Fixed

from dompdf.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 15, 2024

Original comment by eclecticgeek on 31 Jul 2009 at 3:40

  • Added labels: Milestone-Release0.6

from dompdf.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 15, 2024

Original comment by eclecticgeek on 30 May 2013 at 5:15

  • Added labels: Restrict-AddIssueComment-Commit

from dompdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.