-
Notifications
You must be signed in to change notification settings - Fork 46
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
My locale is zh_CN.UTF-8, font-manager lacks 4 cjk fonts #330
Comments
I've found the cause:
After sometimes, I changed my lang to zh_CN.UTF-8, so I ran font-manager under zh_CN.UTF-8, Let's look at public new async void update () {
get_matching_families_and_fonts(db, families, descriptions, sql); // load from db, got Source Han Sans CN
StringSet? available_families = get_default_application().available_families; // load from fontconfig, got 思源黑体 CN
families.retain_all(available_families); // no Source Han Sans CN nor 思源黑体 CN
return;
} |
Sorry for the late response. Haven't been active for a while. I appreciate you taking the time to not only find this bug but actually determine the cause. A couple ways we could resolve this. Will keep this in mind for the next version. Most likely we'll just do with the database what we do with the Google fonts cache which is drop it after a couple days but it might also make sense to drop it whenever environment values change. We'll see. Thanks again. |
We now drop the Fonts table everytime we update the database. I think this should prevent the issue you encountered. Feel free to reopen this if it doesn't. Thanks. |
While dropping the font table did seem to resolve the missing fonts situation it failed to address outdated orthographies which meant invalid sample strings on locale changes. We now track the locale when the database was last updated and rebuild the database anytime it changes. |
Describe the bug
My locale is zh_CN.UTF-8, font-manager show 239 fonts, lacks 4 cjk fonts.
LC_ALL=C font-manager
shows 243 fonts,LC_ALL=zh_CN.UTF-8 font-manager
shows 239 fonts.LC_ALL=zh_CN.UTF-8 font-manager -l
shows all 243, the 4 lacks fonts are:LC_ALL=C font-manager -l
shows all 243, the 4 lacks fonts are:System Information
adobe-source-han-sans-cn-fonts
wqy-microhei
The text was updated successfully, but these errors were encountered: