Closed Yoxem closed 1 year ago
I haven't looked into this in depth, but isn't character-wise application of font families going to throw off all other string handling functions? This doesn't seem like it is conceptually the right approach to the problem. It sounds like you are trying to set a fallback family for character sets not included in a font, is that correct?
It's similar to fallback font, but I just want to set a specific latin font to all the alphabets in a latin region, and set another CJK font for the characters in CJK region. I don't want to render Latin alphabets with the Latin-alphabet glyphs in a CJK font.
I think I get what you're after @Yoxem, but you are kind of being jinxed by somebody else's hacked solution. I suggest you work around this for now using the fontforge python scripts to strip all the Latin glyphs from your CJK fonts of choice. Then the font fallback system will work as expected. SILE does not yet have a way to address character ranges with a style (like CSS does) and hacking it in the way you were trying is likely to break other aspects of the process.
This 4+ year old issue is still valid? From a casual reader viewpoint, it's very unclear what were the expectations for considering it answered or not, or what the next steps should have been.
Agreed.
I want to make a package to set the font of characters in latin region to a specific one, and I modified font-fallback.lua to archive it. the command is defined below:
and I add the funciton isLatin (adopted from simoncozens')
the coded I modified from font-fallback.lua (named test.lua in folder
"packages") is listed below:
The test file (test.sil):
However, when I compile it, it shows the error:
It said that the font is not defined, but I have defined it. How to solve the problem? the files is here: test.zip