Closed kuth-chi closed 1 month ago
Thank you @kuth-chi for fixing those spelling mistakes!
Thank you @kuth-chi for fixing those spelling mistakes!
I would like to contribute more like Khmer default font in FPDF2 is not the most using in Khmer because it's difficult to read. Can I added default font?
Hi @kuth-chi
I would like to contribute more like Khmer default font in FPDF2 is not the most using in Khmer because it's difficult to read. Can I added default font?
In issue https://github.com/py-pdf/fpdf2/issues/700, you mentioned using the Battambang font. Is it the one difficult to read?
What do you mean by "default font" ?
Are you suggesting to add to fpdf2
documentation some recommendations about fonts to render Khmer?
Or are you suggesting something else?
Currently FPDF2 has no default Khmer font right? For Khmer characters will be display base on System or user manual adding. I would like to add a Font example: Front https://fonts.google.com/specimen/Khmer into FPDF2 when font haven't configure for Khmer language will be display this front https://fonts.google.com/specimen/Khmer only Khmer character.
fpdf2 does not have a concept of "default fonts" at all.
In all cases, the user needs to specify which font to use, either directly through set_font()
or indirectly through set_fallback_fonts()
.
Some fonts (for latin-1 characters) are "built-in" to the PDF format, so they don't need to be loaded with add_font()
, but that doesn't give them preference in any other sense.
We don't really want to recommend (let alone discourage) the use of any specific font, since this is largely a matter of opinion and taste. In "docs/Unicode.md" we list a few places where font files can be found. We could add a section there about where to find fonts for "exotic" languages that are difficult to find in the general collections. If you know one or two good places where to find khmer fonts, then that would certainly be helpful information for such a section. Ideally those would be directories of fonts, so we don't need to update individual links too often.
fpdf2 does not have a concept of "default fonts" at all.
In all cases, the user needs to specify which font to use, either directly through
set_font()
or indirectly throughset_fallback_fonts()
. Some fonts (for latin-1 characters) are "built-in" to the PDF format, so they don't need to be loaded withadd_font()
, but that doesn't give them preference in any other sense.We don't really want to recommend (let alone discourage) the use of any specific font, since this is largely a matter of opinion and taste. In "docs/Unicode.md" we list a few places where font files can be found. We could add a section there about where to find fonts for "exotic" languages that are difficult to find in the general collections. If you know one or two good places where to find khmer fonts, then that would certainly be helpful information for such a section. Ideally those would be directories of fonts, so we don't need to update individual links too often.
I have post on issue #1187
Please check for detail.
e.g. Fixes #0
Checklist:
[x] The GitHub pipeline is OK (green), meaning that both
pylint
(static code analyzer) andblack
(code formatter) are happy with the changes of this PR.[x] A unit test is covering the code added / modified by this PR
[x] This PR is ready to be merged
[x] In case of a new feature, docstrings have been added, with also some documentation in the
docs/
folder[x] A mention of the change is present in
CHANGELOG.md
By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.