• Resolved gcextempora

    (@gcextempora)


    Hello, I’m trying to use your great wordpress plugin on MAMP. Everything works beautifully except some minor details that can be overcome (eg I can’t use ‘id’ in the tables, but I solve with ‘class’). But what I can’t solve is the use of custom fonts, loaded in the style sheet with @font-face (formats: woff2, woff, truetype, svg). In my installation, even those loaded from the list in the plugin itself seem not to work (the fonts are also present in my system). Font-syle and font-size work perfectly. In practice, only the default font (DejaVu Serif Cond) is shown in the pdf. Otherwise I can only force with verdana or courier, calling the family without using quotes. I tried both writing the CSS in the plugin and loading the style sheet from the outside. All the rest of the styles are loaded correctly. My code, tested externally to the plugin, works. I am doing a lot of testing writing the code in different variations applying font-family in various ways: to the body, or div containers, or tags, or inline style, or class… but without success. Do you have any suggestions? For now it would also be great to be able to use the list of fonts you have already prepared (here my goal is ubuntu). Thanks for your attention.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter gcextempora

    (@gcextempora)

    Reading your tutorial better, I saw that you use the mpdf library, and I went to read the specifications. The problem is perhaps a little clearer to me now. If I understand correctly, the additional fonts should be added in the plugin and cannot be loaded from the outside as is normally done with the CSS style sheet. Given this, it would be great for me to be able to choose from your list, if only then I actually saw the choice applied in the pdf (maybe it depends on MAMP?). Since I read a bit about mpdf I noticed that some CSS instructions work there in a particular way: for example overflow but also position. In fact, this has given me some problems. Here I solved with absolute positioning (and patience) in containers with problems.

    Plugin Author Florent Maillefaud

    (@florent73)

    Hi!

    Can you test with my GitHub version (new version 0.9.9.1)

    Tell me if it’s ok for you

    Thanks

    Thread Starter gcextempora

    (@gcextempora)

    Great, your fix works very well for me.
    I took the time to test various configurations of my document and everything works. Bold and Italics are also shown correctly (without annoying simulations).
    A respectful little suggestion after my endless tests: perhaps adding a “preview button” at the top, near the first “save setting”, would help a lot when testing complex graphics documents step by step.
    Thank You very much.

    Plugin Author Florent Maillefaud

    (@florent73)

    Hi!

    I have added a another button “Preview” at the top.

    Downloadable on GitHub.

    Thanks

    Thread Starter gcextempora

    (@gcextempora)

    I’m sorry to bother you again, but I realize that although the preview pdf is perfectly produced with the Ubuntu font, now that I’m experimenting with sending it as an email attachment, the pdf sent via email still continues to report the default font (DejaVuSerifCondensed, embedded).

    Plugin Author Florent Maillefaud

    (@florent73)

    Hi!

    Can you download and install again the GitHub version : https://github.com/Florent73/send-pdf-for-contact-form-7/

    I have fixed a bug.

    Thanks for your report.

    Thread Starter gcextempora

    (@gcextempora)

    Thank you so much for your ultra-fast fix.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘fonts don’t work’ is closed to new replies.