Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fonts #1

Closed
tomfischerNL opened this issue Jul 9, 2013 · 2 comments
Closed

Use fonts #1

tomfischerNL opened this issue Jul 9, 2013 · 2 comments

Comments

@tomfischerNL
Copy link

Dear Barry,

Is it possible to use fonts in this module?

If I load a view (PDF/invoice), it does not recognise my fonts, even not inline.

$pdf = PDF::loadView('PDF/invoice', array('user' => $user));

Edit:
Solved.. Just in the head, worked

body {
font-family: 'Helvetica'
}

@barryvdh
Copy link
Owner

barryvdh commented Jul 9, 2013

It should support @fontface, but not sure if it supports all formats. This example works for me:
http://pxd.me/dompdf/www/examples.php#css_at_font_face.html,html

Haven't tested it, but you should be able to use your own fonts, if you pass in the correct files (try http://www.fontsquirrel.com/ to generate them for example). And make sure you reference the files correctly (probably full path)

@career-builders-ltd
Copy link

Load font using load_font.php then copy "dompdf_font_family_cache.php" within the 'vendor/dompdf/lib/' to 'storage/fonts'. Works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants