Closed wesoos closed 4 years ago
Check out this guide:
https://baskren.github.io/Forms9Patch/guides/CustomFonts.html
Thanks. It seems though this article relates to label, button, and other forms elements. I am using this library to convert raw html source to a png image. In the styling of the html, I'm using a custom font. Is this possible?
Wessel Oosthuizen
From: Ben Askren notifications@github.com Sent: Tuesday, August 11, 2020 9:06:42 AM To: baskren/Forms9Patch Forms9Patch@noreply.github.com Cc: Wessel Oosthuizen wessel@tekwavesolutions.com; Author author@noreply.github.com Subject: Re: [baskren/Forms9Patch] Html to PNG - Custom Font (#70)
Check out this guide:
https://baskren.github.io/Forms9Patch/guides/CustomFonts.html
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/baskren/Forms9Patch/issues/70#issuecomment-671935307, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXERZUHLSHKUJT3IBFLCLTSAE66FANCNFSM4P2OWZNA.
oh, you are living on the edge.
Short answer: likely.
Long Answer:
The most direct (and fool proof) approach is to embed the custom font into your html file. Something I am not an expert in but I know it can be done - with a bit of effort (Google is your friend). For example: https://gero3.github.io/facetype.js/.
Because the direct approach is very labor intensive, I built (but not documented) EmbeddedHtmlViewSource class. I highly recommend taking a look at the source code. I haven't adapted it to fonts, but it does handle images - so, with a little work, it could be extended to work with fonts.
Hi, how would I use a custom font with the html code that I want to convert to an image? The font is a barcode font I need...