Closed huelsmc closed 5 years ago
Yes, TCPDF
should support OTF
fonts, but I just came across this line of code in TCPDF
:
} elseif (substr($font, 0, 4) == 'OTTO') {
// Open Type (Unicode or not)
//Unsupported font format: OpenType with CFF data
return false;
} else {
So maybe you have an OpenType
font with CFF
data? That would not be supported by TCPDF
.
A couple of things you could try:
type
option and let TCPDF
guess the font format. Like this you could check whether the condition above is met or not.Roboto
or OpenSans
font, these should work for sure. If they do not work, it might be possible, that your EXT:pdfviewhelpers/Resources/Private/PHP/tcpdf/fonts
folder is not writable.TTF
, there are a couple of free online converters available.Thanks for your feedback. I will test this. It's totally possible that the font has CFF data (sorry i have not that much experience with fonts). This probably can be closed.
I just reopen the issue in order to add a note about this to the documentation. If you find a way to solve your issue, it would be nice if you would share your solution. If you like the project, please consider giving it a star :)
Hey,
in the documentation of TCPDF you can see that it also supports otf fonts. Is it somehow possible to add this type to a document? Tried via type= OpenType but this didn't work (as it is in your documentation).
Greetings