-
Notifications
You must be signed in to change notification settings - Fork 17
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
issues with the fontconfig rules #13
Comments
To be more precice, I think only the rules removed here should be shipped by this project: This means, especially, that
Gosh, you even apply this to |
Hello @fabiangreffrath, so to clarify everything written here...
Yes, you're right, and the hijack actually happens. We are already dealing with this in Fedora for example.
After agreement with fontconfig upstream we have used value
They actually are, and they are shipped in separate fontconfig files - one fontconfig file for each font, and three special fontconfig files (
I don't think so. These rules were created by the fontconfig upstream's guidelines. The only problem with these fontconfig files is choosing correct priority/ordering value for yourself. Please note that these changes were done in coordination with fontconfig upstream, because they prefer that the each font family/project keeps their own fontconfig files for the fonts. So I have kind of volunteered to "maintain" the fontconfig files for these (URW)++ fonts, because Artifex does not actually need them for the Ghostscript in any way. But I'm not a fontconfig guru, so that's why I'm opened to any feedback and discussion. :)
If you would look at the previous versions of (URW)++ fonts and older versions of fontconfig, you could actually see that those fontconfig configuration were "living" as part of default fontconfig configuration (shipped with fontconfig by default, at least in Fedora). These fontconfig rules had the priority Which takes me back on how to correctly select the priority/ordering value for these specific fontconfig files... First, we have to realize that each Linux distribution using fontconfig can have their own rules on priority/ordering of the fonts used/installed on their operating system. As far as I know (correct me if I'm wrong), fontconfig does not provide any "official" guidelines on how to choose priority/ordering for each font family. This is left entirely on each fontconfig maintainer for each Linux distro. Therefore if Fedora would choose 60, that still might not be good enough value for other distributions, because those might prefer different fonts/look/feeling of their distribution, and that's (IMHO) how they create their own ("internal") guidelines on how to set correct fontconfig priority/ordering inside their distribution. And that's the reason why it is said in Just an example of Fedora's fontconfig priority/ordering guidelines:
To sum up - I agree that the suggested value Was my explanation okay for you, or is something unclear? Or would you like to make any other changes? :) |
Please don't mistake my criticism as offensive! I just had the impression that the supplemental files lacked some review so far and tried to contribute this.
Following guidelines doesn't necessarily mean that the result is correct. In the example in my previous post you declared Standard Symbols PS as the preferred font for the "serif" family, which I find pretty hard to follow.
This would make a lot more sense if you just replaced the rules that have been removed upstream by fontconfig: https://cgit.freedesktop.org/fontconfig/commit/conf.d?id=cc67d7df172431cb345ed42c27eb852e2ee65ae2 But you added a lot more rules and some of them apparently don't belong into or contradict existing rules in that priority range.
Fontconfig upstream comes with a perfectly sorted list of default rules, and I am sure that you are not supposed to change them: https://cgit.freedesktop.org/fontconfig/tree/conf.d
I'd change the suggestion to "place the rules with a lower priority than upstream's
I'd prefer if you could remove the redundant rules (as I pointed out, some of the rules you added are already in upstream's |
Don't worry, I'm not. :) This is a necessary part of all FOSS projects, and sometimes it's like discussing politics... :D It might be boring for many people, but it's often necessary. ;) (And sometimes you need to "beat people down" with good arguments to change their mind. :D)
That's true, and it can certainly be this case.
I had a problems dealing with this myself as well. After that I have decided to follow what Wikipedia says about it (https://en.wikipedia.org/wiki/Symbol_(typeface)): "It contains a complete unaccented Greek alphabet (upper and lower case) and a selection of commonly used mathematical symbols. Insofar as it fits into any standard classification, it is a serif font designed in the style of Times Roman." So, this fonts falls into LGC (Latin Greek Cyrilic) group of fonts, because it can be used to display Greek correctly. And the font intself contains serifs as well. Ergo, by the definition of serif fonts, this To follow up on this - here's the decision making algorithm/process used for deciding to which generic group the font falls into:
As you can see, by that process/algorithm, it falls into
Does it sound reasonable enough for you? :)
Using what upstream removed (based on my patch) would result only (IMHO) in fontconfig working partially with these fonts. Again, I followed up the guidelines, thats why the fontconfig for the fonts now contains additional mappings. All of these mappings should help in different scenarios, which could potentionally happen. Not having these mappings complete could results that these fonts wouldn't be used as they should, and some other similar fonts would be used instead. I had several discussions with upstream about these mapping rules. However, even if you try comprehense it all, sometimes you just miss something, because the number of font mappings currently messing/working with each other is really complex.
So far, you have only mentioned the
As I said, I proposed that patch to upstream which removed some of the old (URW)++ aliases, and we kept only small subset for compatibility reason there. And actually fontconfig says it totally up to each distribution if they will use the fontconfig default values or not, or if they will decide to somehow "override" and to which extent. Also, the point here is not to change them - for that I would send a patch to upstream. If we get back to the root cause of this - fontconfig having wrong priority - that also takes us back to what upstream said - each user/distribution are free to override/change the prirority rules/ordering based on their own preferences. This is FOSS after all. :) So in this case, when you are using the fonts on your own, based on the If you are using it as a package from your Linux distribution, then you need to contact a maintainer of this fonts package, and ask him to set the fontconfig priority correctly for that specific Linux distribution you are using... ;) IMHO, we're kind of beating the dead horse here, so to get back to what we can really change here:
NOTE: And than you for pointing that out - because I actually wasn't aware that (URW)++ mapping/aliasing is done in other default fontconfig files. That actually explains nicely your problem, and also points out that my patch suggested to upstream was incomplete. I will propose an additional patch to upstream for them to correctly reflect the (URW)++ fonts. I don't see any other issues that we can fix here now. If you know about some, please let us know. :) Ah, and small note regarding this:
There are also some redundant rules in Uff, I hope my explanations and other notes makes sense... :D |
Thank you very much for the detailed elaboration, @deekej !
Yes, this (i.e. the three points you made up) sounds reasonable to me!
I am not convinced that each font should become the preferred font in its generic category and then the rule gets shifted so far back in priority that other rules take precedence and the initial rule becomes worth as much as an
I am the Debian maintainer for this package, that's why I am so picky about these rules. ;) https://tracker.debian.org/pkg/fonts-urw-base35
Absolutely, I agree that these are the three things that need to happen to close this issue.
Thank you! I am convinced that if you work closely together with fontconfig upstream and the Fedora fontconfig maintainer and let them have a look over the rules provided here, that everything gets back into reasonable shape soon. ;) Cheers,
|
Could you please elaborate on this? You probably know more about this topic than I do. :) Because if I recall correctly, there were 2 accept rules before (for It would be nice if you good provide some more explanation, so we could fix this if needed. ;)
I will be lowering the fontconfig files' priority in Fedora as well to |
Not sure, let's see. Please excuse my naive language, I am also not a guru at all. ;) It is my understanding that This is where the hijacking came from: The urw-base35 rules were installed with higher priority than upstream's On the other hand, if we sort the urw-base35 rules after upstream's I hope this makes sense. ;)
So we are the maintainers! hugh |
Hey @fabiangreffrath, that makes a lot of sense to me now, thanks! :) I'm currently hold up with my main job responsibilities, so I hope to get on with this during the next week. ;) |
No need to rush. As I pointed out, if applied with a priority of 61 or lower, the impact of the |
Hello @fabiangreffrath, sorry for the late response. I created an update to I still need to contact fontconfig upstream about the |
Looks good to me, thanks! |
Hi guys,
something is wrong with your fontconfig rules files, i.e. either with the rules themselves or with the priority that you suggest for installing them. Let's have a look at Nimbus Mono PS specifically.
This happens on my system before installing any of your fontconfig rules:
This is the expected result, we will lates see why. This, however, is what happens once I install your
urw-nimbus-mono-ps.conf
fontconfg rules file as/etc/fonts/conf.d/30-urw-nimbus-mono-ps.conf
:As you can see, due to this rule, Nimbus Mono PS does a system-wide hijack of the "monospace" fontconfig generic, which has an immediate effect on e.g. my terminal and text editor. This is neither expected nor -- I hope -- intended.
It all happens because of this specific rule in the
urw-nimbus-mono-ps.conf
file:Please note that (a variant of) this rule is already in fontconfig's upstream rule file in
/etc/fonts/conf.d/60-latin.conf
:As you can see, there is a specific priority in the monospace fonts, probably based on the (admittedly subjective) suitability as a terminal font -- and DejaVu Sans Mono comes clearly before Nimbus Mono PS. However, by installing the
urw-nimbus-mono-ps.conf
file with a higher priority than60-latin.conf
, this ordering is messed up and Nimbus Mono PS is installed with an unsuitably high priority.I see two ways out of this unfortunate situation: Either, you recommend to install the fontconfig rules files with a priority lower than that of
60-latin.conf
, e.g. 61, or you remove the redundant rules that are already part of fontconfig upstream's rules set out of your fontconfig rules files.The text was updated successfully, but these errors were encountered: