Bug 1073460
Summary: | Make alias Consolas displaying DejaVu Sans Mono | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Matěj Cepl <mcepl> | ||||||||||||||
Component: | fontconfig | Assignee: | Akira TAGOH <tagoh> | ||||||||||||||
Status: | CLOSED ERRATA | QA Contact: | Desktop QE <desktop-qa-list> | ||||||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||||||
Priority: | unspecified | ||||||||||||||||
Version: | 7.0 | CC: | mcepl, mclasen, petersen, tagoh, tpelka | ||||||||||||||
Target Milestone: | rc | ||||||||||||||||
Target Release: | --- | ||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||
OS: | Unspecified | ||||||||||||||||
Whiteboard: | |||||||||||||||||
Fixed In Version: | fontconfig-2.10.95-8.el7 | Doc Type: | Bug Fix | ||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||
Clone Of: | Environment: | ||||||||||||||||
Last Closed: | 2016-11-03 21:18:19 UTC | Type: | Bug | ||||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||||
Documentation: | --- | CRM: | |||||||||||||||
Verified Versions: | Category: | --- | |||||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||
Embargoed: | |||||||||||||||||
Bug Depends On: | |||||||||||||||||
Bug Blocks: | 1295396, 1297830, 1313485 | ||||||||||||||||
Attachments: |
|
Description
Matěj Cepl
2014-03-06 13:26:25 UTC
Could you attach a screenshot (for before and after too if you like) just to make sure we're looking at the same thing. You mean for example slide 29, etc? I didn't try your .conf file yet... Though the slides don't look that bad to me your idea still might make sense perhaps, but I don't know if dejavu mono is the best fit to Consolas. Anyway I feel it would be better to do such a change first in Fedora, so you might want to report the bug there first. Created attachment 871971 [details]
before
Created attachment 871973 [details]
after
(In reply to Jens Petersen from comment #2) > Could you attach a screenshot (for before and after too if you like) > just to make sure we're looking at the same thing. > You mean for example slide 29, etc? And yes, slide 29 is the same thing ... basically anywhere a snippet of the code shows up. (In reply to Jens Petersen from comment #2) > Anyway I feel it would be better to do such a change first > in Fedora, so you might want to report the bug there first. It certainly should be fixed in Fedora as well, but I believe this is very simple just a configuration fix, and it would serve our enterprise customers as well. This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. dunno what font was actually used in "before" screenshot though, that looks like font was rendered with wrong hinting. in Fedora, we have a policy to have a separate configuration files for fontconfig per fonts and inherited into RHEL as well, it should be fixed in that font package IMHO (not to have an alias for consolas but proper hinting to have better looks). aside from that having all of aliases into fontconfig is difficult. if it isn't for a font we are packaging, you better do that in your local config as you did as a workaround. (In reply to Jens Petersen from comment #2) > but I don't know if dejavu mono is the best fit to Consolas. me meither. so if we really need to fix this in fontconfig anyway, I would propose to have an alias for consolas to monospace but not to a specific font. Matěj, could you determine which font was used in the 'before' screenshot? Created attachment 1111777 [details]
original presentation
Just for the sake of completness
Created attachment 1111801 [details] export to PDF (In reply to Jens Petersen from comment #11) > Matěj, could you determine which font was used in the 'before' screenshot? OK, after uninstalling all my third-party fonts I got to point where I can reproduce it. There are two lines of attack: 1) exported PDF manifests exactly the same behavior to me (see attached), 2) according to LO developers, there is no way how to find out the substituted font used, but it is actually rather easy with fc-match: ~$ fc-match Consolas DejaVuSans.ttf: "DejaVu Sans" "Book" ~$ Which is obviously a wrong idea for the monospace font. That is because fontconfig adds sans-serif into the font pattern as a last resort to find out a better font if it doesn't contain generic aliases such as sans-serif, serif, or monospace. As I said earlier, supporting all of fonts in fontconfig is difficult and maybe not realistic. IMHO ideally applications which generate documentations should adds a proper fallback too because they should know what it is. so we can avoid the endless complaints like this... Is this better in Fedora 23 say (with LiberOffice 5)? (In reply to Jens Petersen from comment #15) > Is this better in Fedora 23 say (with LiberOffice 5)? I don't have any Fedora around and the internal CSB repo of LO still has only libreoffice-impress-4.4.7.2-2.el7.csb.x86_64 (In reply to Akira TAGOH from comment #14) > As I said earlier, supporting all of fonts in fontconfig is difficult and > maybe not realistic. I am not talking about ALL fonts, just the most well-known ones. We already support Adobe basic fonts (e.g., Times), so I propose just adding the Microsoft ones as well (whatever is freely provided with MS Office or MS Windows). So what a solution do you want to see for this? Is an alias to Monospace for Consolas enough? or want to have an alias to DejaVu Sans Mono? (In reply to Akira TAGOH from comment #19) > So what a solution do you want to see for this? Is an alias to Monospace for > Consolas enough? or want to have an alias to DejaVu Sans Mono? Well, I was thinking about aliases of all these fonts https://en.wikipedia.org/wiki/Category:Windows_Vista_typefaces https://en.wikipedia.org/wiki/Category:Microsoft_typefaces or (this is probably a better list) https://www.microsoft.com/typography/fonts/product.aspx?PID=164 (not sure about non-Latin scripts, but we may need them as well)? and it really doesn't matter that much IMHO what fonts will be actually used, so yes either Monospace or DejaVu Sans Mono is fine with me. Okay, I'll try to manage this in fontconfig then. Created attachment 1161306 [details]
proposed changes to 45-latin.conf
Thanks, any suggestions on how best to test the patch? I mean both for functionality and against potential regressions. all of the proposed changes are to add 'default' tag i.e. appending a family to the end of the list. so that shouldn't affect the usual queries except it doesn't originally match any without this change. for functional testing, requesting those fonts should simply works and see what typefaces it returns. (In reply to Jens Petersen from comment #23) > Thanks, any suggestions on how best to test the patch? > I mean both for functionality and against potential regressions. The manual testing, prepare set of documents on Windows (e.g., the attached slides), and check they display correctly? As of automatic testing I have no idea (and we have this problem in Desktop QA as well; comparing screenshots seems like incredibly brittle technology, but I don't think I can imagine much anything else). Whatever you do for other fonts? Has anyone tried the patch? Created attachment 1165647 [details]
.rej file when applying the patch
When trying to patch the 45-latin.conf in /usr/share/fontconfig/conf.avail I got:
mitmanek:conf.avail# patch -p2 -z.orig </home/matej/0001-45-latin.conf-Add-some-Windows-fonts-to-categorize-t.patch
patching file 45-latin.conf
Hunk #2 succeeded at 54 (offset -4 lines).
Hunk #3 FAILED at 70.
Hunk #5 FAILED at 161.
Hunk #6 succeeded at 203 with fuzz 1 (offset -12 lines).
2 out of 6 hunks FAILED -- saving rejects to file 45-latin.conf.rej
And the *.rej file is attached.
Otherwise when I have fixed the .rej issues, I get perfectly working stuff, which seems to make LOImpress working on the attached presentation. Okay, fixed in 2.10.95-8.el7 Yes, works perfectly. Thank you Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2601.html |