Comments (3)
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.
Original comment by eclecticgeek
on 31 Jul 2009 at 3:40
- Added labels: Milestone-Release0.6
from dompdf.
Original comment by eclecticgeek
on 30 May 2013 at 5:15
- Added labels: Restrict-AddIssueComment-Commit
from dompdf.
Related Issues (20)
- What about vietnamese font in dompdf ver0.6.0? HOT 2
- HTML table border style is not working HOT 1
- multiple pga egeneration issue with dompdf HOT 1
- problem of generating views of joomla 2.5 HOT 1
- Second page and on dosen't respect top margin HOT 1
- Display headers and footers in all pages
- Having error issues with Unlink and drupal
- text overlapping at start of pdf when table row exceeds the length of the page
- rowspan is not working while page breaks HOT 1
- This is a fix for issue 91 - infinite loop
- PDF Merger in dompdf
- ..
- Error sub-setting in DOMPDF
- Image is cut end of the page.
- Problem in generating pdf in kannada
- Warning: DOMXPath::query(): Invalid expression in
- about ISSUE 91, I have found a fix.
- List issues in page break
- Damaged PDF
- How to generate barcode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dompdf.