frappe / print_designer

Visual print designer for Frappe / ERPNext
GNU Affero General Public License v3.0
179 stars 101 forks source link

Support more fonts #100

Open bobotdls opened 6 months ago

bobotdls commented 6 months ago

Not displaying right text in Thai font It's display a box only Capture

maharshivpatel commented 6 months ago

@bobotdls Not really a Print designer issue as far as i know. Fonts you are using doesn't support Thai. Can you please share the name of the font .

bobotdls commented 6 months ago

Bai Jamjuree & sans-serif These two font I use in customize print format in CSS

bobotdls commented 6 months ago

Only on generating the pdf... If I print it's show the right font

maharshivpatel commented 6 months ago

Only on generating the pdf... If I print it's show the right font

Yeah, because we don't have Bai Jamjuree font that is why it is showing this and on preview it is showing probably because you may have fonts installed on local machine that support Thai

bobotdls commented 6 months ago

after I download the said font, where do I put the file on the eprnext folder?

maharshivpatel commented 6 months ago

you just install it on the server/computer

bobotdls commented 6 months ago

ok thanks... Now it's working.. Capture

PhantomKunai commented 1 month ago

In this line it would be really nifty if we can set fonts by just looking them up on Google. I want to set this font, https://fonts.google.com/specimen/Figtree but I cannot because the existing font list is a static list.

image

maharshivpatel commented 1 month ago

@PhantomKunai problem is all fonts have different fontWeights and Italic fontWeights. we need this information for it to work. we can get them from google's font api but it is paid.

we can add as many fonts we want just add it to the list and raise pr i will merge it.

PhantomKunai commented 1 month ago

@maharshivpatel Ah I see. Perhaps one may contribute widely used fonts to the list, and maybe we can find some way to add fonts through a custom app for those who have some obscure font requirements or they are really looking to work with custom fonts.

Is my understanding correct that only these fonts are displayed in the font selection box?

PhantomKunai commented 1 month ago

image

Maybe even some way to fill those font parameters in manually somewhere here or perhaps in Print Designer Settings page, if there is one.

maharshivpatel commented 1 month ago

@PhantomKunai Yes, this list is rendered in the selection box.

we can make a field in print_format to add custom fonts but at that point we can just add it inside print_designer UI only.

adding fonts from custom app is possible but we first need some kind of plugin system that other users can hook into like frappe framework.