bithost-gmbh / pdfviewhelpers

TYPO3 CMS extension that provides various Fluid ViewHelpers to generate PDF documents.
GNU General Public License v3.0
44 stars 19 forks source link

Poppins not Working as Custom Font for PDF Generation - Roboto works as expected. Why?! #195

Closed oruehenbeck closed 2 years ago

oruehenbeck commented 2 years ago

If you could answer all this questions with yes, please feel free to open an issue with your question. We will try our best to help you.

Added the font, Poppins.ttf is Poppins-Regular.ttf renamed:

        fonts {
            addTTFFont {
                poppins {
                    path = EXT:xxx/Resources/Private/Fonts/Poppins.ttf
                }
                roboto {
                    path = EXT:pdfviewhelpers/Resources/Public/Examples/FullFeatureShowCase/Roboto.ttf
                }
                robotob {
                    path = EXT:xxx/Resources/Private/Fonts/RobotoBold.ttf
                }
            }
        }

If I set "poppins" here, there are letters in the pdf, but they are not visible:

    generalText {
        trim = 1
        removeDoubleWhitespace = 1
        color = #000
        fontFamily = roboto
        fontSize = 8
        fontStyle = regular
    }

Files:

Poppins.zip

Results in the same PDF but not letters are visible. (But I can mark them, so clearly something is happening)

maechler commented 2 years ago

@oruehenbeck I had a brief look at the issue, unfortunately I have not found a solution yet. It looks like a conversion issue in the TCPDF library. I would recommend to look for a solution for similar problems related to TCPDF, e.g. in the GitHub repository: https://github.com/tecnickcom/TCPDF/issues Maybe you could also try to convert the font to a different font format and back to TTF and try it with this new file.

maechler commented 2 years ago

@oruehenbeck Have you found a solution for that issue?

maechler commented 2 years ago

Closing because of no response.