romenov
romenov

Reputation: 33

dompdf font family issue

I'm using Bamboo invoice as an invoice generator, and I'm trying to customize the invoice template, but no matter what I do, the font just won't seem to adjust.

currently I have

body {
margin: 0.5in;
font-family: 'helvetica';
font-size: 10pt;}

I've read up on it, and helvetica is an installed font, so it should work

to make sure I changed it to 'courier'; which is also in the lib/fonts directory, but the font remains the same.

Any help?

Upvotes: 2

Views: 8252

Answers (4)

Ewout
Ewout

Reputation: 2478

I solved my problem by removing a font: inherit that was applied as a 'css-reset' to almost all elements as a first declariation. Apparently this is not overridden by later declarations, and/or inherit doesn't work properly.

Upvotes: 3

Valdars
Valdars

Reputation: 863

I had similar problem with DomPDF 6b3 when trying to use font-family or font-size. Finally discovered that using font instead of those seems to be working.

Upvotes: 2

TuxM
TuxM

Reputation: 80

Kinda late, but still applicable for google visitors

I had a similar problem with DomPDF, but since BambooInvoice uses it... Anyway DomPDF has trouble with the font-family definition in the CSS. I applied inline style to the top div box to solve the problem.

<div id="container" style="font-family:sans-serif;">
....
</div>

Upvotes: 3

egrunin
egrunin

Reputation: 25053

Remove the quotes around helvetica.

Upvotes: 0

Related Questions