-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
So.. why? #1
Comments
Hi, Sorry I wrote something about this before on my blog but it's in Chinese, I forgot to add an English version. Nowadays:
it's a huge font family, but most of the fonts are useless for those who never know that language. so it's not wise for me to develop a long fontconfig list for that and installed for every user. it'll make debug ugly and runtime lag so I have to find a way to detect the installed fonts and generate fonts.conf programmingly.
but they do not prepend a "emoji" alias in css, they just put emoji font along with sans-serif. so actually currentlly emoji fonts has to fight with sans-serif, they have to be small enough to "just display emojis" but it's not the case, almost every emoji font available has 0-9 and some other common symbols. if it is prepended before sans-serif. the 0-9 and common symbols in them will take effect. Noto Color Emoji even has a long long space as emoji which will break the page content. so I have to append emoji in the last part of the sans-serif match to avoid this, then blacklist all the emoji characters in sans-serif fonts to let emoji font do the job. then we need to programmingly know what sans-serif are avaiable and what charaters they have, the intersected characters and so on. |
I must admit I am not really that familiar with It works better for me to learn things by comparison rather than reading a lot of theory. Probably some of my questions are naive, and already covered in some lengthy manual, but I will still ask them anyway if you don't mind. )
Is the problem that unused fonts take too much space?
What is the role of fontconfig list? Just installing the font is not enough to use that?
Meaning that they just show a symbol from a font that looks like emoji?
So. the |
I found out you are a developer. so things may be easy for you to understand. on linux, application ask for a font (usually sans-serif), but there's no font with name "sans-serif" anywhere. it's an alias for a list. application just use the first one in that list as "sans-serif". then how to change the order of the list to make sure the 1st one is just the one you want? fontconfig does. so you may have limited fonts installed on your system as I do, because Korean may be not our interests . but openSUSE has Korean users, right? as openSUSE developer, we have to make sure if a Korean user installs noto-sans-kr, he/she can display korean right away, and display it beautiful. then we need to pre-install fontconfig configuration for Korean fonts. But, it's useless for you Russian/Ukrainian and me Chinese... So, it's not because the unused fonts take too much space, but the unused configurations take too much parsing time and generate garbage at runtime. such "unsed" configuration is a must for a system, but not a must for your system. fontconfig parses all configurations for the system. there's no way to selectively parse parts or some of them. the new generattion tries to solve that problem. we try to provide configuration at runtime not at build time to reduce the garbage. of course there's another solution: ship the configuration for a single font with the single font. but the quality will be out of our control, and make it harder to maintain a font (I as a Chinese, I don't know what is "beautiful configuration" for Russian/Ukrainian, right?) and we will lose the whole picture, what if two fonts (one in factory and one in somebody's home) occasionally both declare to be the system default?
if the page content has a char, system will try to see if Noto Color Emoji contains that char (unicode point) first, then check the Russian/Ukrainian font, then check the Chinese font. but if Noto Color Emoji has that char, Russian/Ukrainian will not be checked at all. So how you see the page depends on what the emoji font has. You may see Russian/Ukrainian displayed with Funny images :-) that's the problem. as a solution, we have to put Emoji to the last part to make sure Russian/Ukrainian is displayed like Russian/Ukrainian. but your Russian/Ukrainiann font may have a unicode point represent "smile face" too. then we'll have to blacklist that unicode point in Russian/Ukrainian font to make sure smile face is displayed like Emoji. that is, no matter where emoji font is placed, it has to fight with normal fonts.
so the question is not about the scan stage (actually fonts-config-ng should avoid a second scan, we get all information from fontconfig directly to avoid the disk IO). it's about font based or unicode point based. applications are font based. you can not pick the shape represent A from all the font, then choose to display A with shape in A font and B with shape in B font. you ask for a font, and display eveything it can display with it. and display the undisplayed thing with another font. |
@abitrolly by the way you can show me the snap package and I can help with that, for the fontfonfig part. |
I could find an explanation, so I have to ask why a new generation is needed?
The text was updated successfully, but these errors were encountered: