Re: [Rd] Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?
Le mercredi 25 mars 2020 à 11:28 +0100, Iñaki Ucar a écrit : > On Wed, 25 Mar 2020 at 01:14, Gavin Simpson > wrote: Hi, > Adding de...@lists.fp.o to CC. A workaround is to avoid using PS > fonts for symbols. PS fonts are dead mid-term everywhere, and already forbidden in new Fedora font packages (because we are somewhat leading edge, but not as much as people think) https://docs.fedoraproject.org/en-US//packaging-guidelines/FontsPolicy/#_font_file_formats PS font users need to switch to OpenType fonts or work with their prefered font upstream to convert in modern well supported formats (font format wars have endend last millenium, even before the browser wars ended, it’s long past time to deprecate the losers). That’s normal IT format obsolescence. That being said, that’s not what is happening here. R brought this all on itself by hardcoding a Windows-only “Symbol” font family name in its default conf. Linux systems are UTF-8 by default for ~20 years now, they don’t need the forcing of magic font families to handle symbols not present in the 8-bit legacy Windows encodings. The actual effect of this conf is not the selection of font files with special and unusual symbols. It is to priorize fonts that match the "Symbol" magic name. And those fonts are few and crumbling on Linux systems, because no one has needed to bother with them since Linux switched to UTF-8 last millenium. Just stop using “Symbol” in R and things will work a lot better. Alternatively, prepare to maintain the “Symbol” aliasing stack in fontconfig (and fight with wine for it), because *no* *one* *else* *cares* about this legacy Windows-specific stuff. Fontconfig upstream already told this to R users in its own issue tracker. Regards, -- Nicolas Mailhot __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?
Le lundi 30 mars 2020 à 15:24 +1300, Paul Murrell a écrit : > Hi > > I have created an R branch that contains a potential fix ... > > https://svn.r-project.org/R/branches/R-symfam/ > > This allows, for example, ... > > cairo_pdf(symbolfamily="OpenSymbol") > > ... to specify that the OpenSymbol family should be used as the > "symbol" font (e.g., for "plotmath") in R. Thanks for looking at it! But, really, there is no such thing as a Symbol font on Linux anymore. Symbol is pre-unicode thinking. Most modern general-purpose unicode fonts will include every codepoint Symbol ever shipped, and fontconfig will fallback gracefully when that’s not the case (unless your fontconfig integration is broken). Just use the sans-serif or monospace fontconfig defaults. You don’t need Symbol, or OpenSymbol, or any special font setup. Symbol’s codepoint coverage is laughable by 2020’s UTF-8 standards. Symbol << Normal Unicode font (DejaVu*) << Special math fonts (STIX2) I you do advanced math stuff, you may need a special math font like STIX, but that’s lights years more advanced than Symbol, and a general purpose font like DejaVu has been shipping a MATH block for several years now Regards, -- Nicolas Mailhot __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?
Le mardi 31 mars 2020 à 10:14 +1300, Paul Murrell a écrit : > Hi > > On 30/03/20 11:12 pm, Nicolas Mailhot wrote: > > Le lundi 30 mars 2020 à 15:24 +1300, Paul Murrell a écrit : > > > Hi > > > > > > I have created an R branch that contains a potential fix ... > > > > > > https://svn.r-project.org/R/branches/R-symfam/ > > > > > > This allows, for example, ... > > > > > > cairo_pdf(symbolfamily="OpenSymbol") > > > > > > ... to specify that the OpenSymbol family should be used as the > > > "symbol" font (e.g., for "plotmath") in R. > > > > Thanks for looking at it! > > > > But, really, there is no such thing as a Symbol font on Linux > > anymore. > > Symbol is pre-unicode thinking. Most modern general-purpose unicode > > fonts will include every codepoint Symbol ever shipped, and > > fontconfig > > will fallback gracefully when that’s not the case (unless your > > fontconfig integration is broken). > > Yep, the "symbol" font is an (outdated) R "plotmath" concept, but > one > that would take a fair bit of surgery to remove. R plotmath > converts > certain R expressions (in certain contexts) to code points in the > Adobe > Symbol Encoding (ASM), but for cairo-based devices, those are > converted > to UTF8 code points. > > > Just use the sans-serif or monospace fontconfig defaults. You don’t > > need Symbol, or OpenSymbol, or any special font setup. > > Agreed. I got reasonable coverage from DejaVu Sans and FreeSerif. > There are still a number of ASM code points that are not covered > though, > for example, ... > > F8EB E6 # LEFT PAREN TOP# parenlefttp (CUS) > F8EC E7 # LEFT PAREN EXTENDER # parenleftex (CUS) > F8ED E8 # LEFT PAREN BOTTOM # parenleftbt (CUS) > > Even OpenSymbol is missing a few (though perhaps not very common > ones) ... All the F8* codepoints are in the private use area. That means you can’t rely on them existing in standard unicode fonts You need to use correct Unicode values for things to work: Ux239… for parenthesis, brackets https://www.unicode.org/charts/PDF/U2300.pdf > F8E6BD # VERTICAL ARROW EXTENDER # arrowvertex (CUS) > F8E7BE # HORIZONTAL ARROW EXTENDER # arrowhorizex (CUS) and 23AF/23D0 for arrow extensions (though arrow font support seems messy, probably because it sees little use; it’s a pity R comes so late to the party, those are just lines, it would have been trivial to get them into DejaVu before the project gone dormant). GFS NeoHellenic (Math block) seems complete but it’s not a common font family. > F6DAD2 # REGISTERED SIGN SERIF # registerserif (CUS) > F6D9D3 # COPYRIGHT SIGN SERIF # copyrightserif (CUS) > F6DBD4 # TRADE MARK SIGN SERIF # trademarkserif (CUS) > F8E8E2 # REGISTERED SIGN SANS SERIF# registersans (CUS) > F8E9E3 # COPYRIGHT SIGN SANS SERIF # copyrightsans (CUS) > F8EAE4 # TRADE MARK SIGN SANS SERIF# trademarksans (CUS) Those are useless nowadays, just use normal registered/copyright/trademark codepoints, and a font in the wished style (serif sans serif, whatever looks nice to you) Regards -- Nicolas Mailhot __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] [FORGED] Re: Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?
Le mardi 31 mars 2020 à 15:07 +1300, Paul Murrell a écrit : > > Thanks, that's useful. For my own memory, this is the parenthesis > block > that might be useful ... > > U+239b Sm LEFT PARENTHESIS UPPER HOOK ⎛ > U+239c Sm LEFT PARENTHESIS EXTENSION ⎜ > U+239d Sm LEFT PARENTHESIS LOWER HOOK ⎝ > U+239e Sm RIGHT PARENTHESIS UPPER HOOK ⎞ > U+239f Sm RIGHT PARENTHESIS EXTENSION ⎟ > U+23a0 Sm RIGHT PARENTHESIS LOWER HOOK ⎠ > U+23a1 Sm LEFT SQUARE BRACKET UPPER CORNER ⎡ > U+23a2 Sm LEFT SQUARE BRACKET EXTENSION ⎢ > U+23a3 Sm LEFT SQUARE BRACKET LOWER CORNER ⎣ > U+23a4 Sm RIGHT SQUARE BRACKET UPPER CORNER ⎤ > U+23a5 Sm RIGHT SQUARE BRACKET EXTENSION ⎥ > U+23a6 Sm RIGHT SQUARE BRACKET LOWER CORNER ⎦ > U+23a7 Sm LEFT CURLY BRACKET UPPER HOOK ⎧ > > However, the situation is still not completely straightforward. The > style of the symbols is also an issue and the DejaVu symbols are not > as elegant as, say, the OpenSymbol symbols. What makes things tricky > is that, AFAICS, DejaVu has (TTX Unicode cmap output) ... Ah, the endless design discussions… Myself I prefer a consistent design like Dejavu, over cobbling symbols of different designs, because they used to be in separate fonts. Anyway: > > > ... while OpenSymbol has ... > > > > ... but neither has the other. OpenSymbol is incorrect (it suffers from the same pre-unicode bias as R). However, it is, to my knowledge, actively maintained. You can ask its upstream (LibreOffice) for Unicode conformance fixes if you find problems. Especially when it’s just fixing the map of an existing glyph, that should not be hard for them to fix. Anything PUA-related won’t interoperate well in an unicode world. (you can ask DejaVu too, maybe a request from a project like R will wake up its maintainers. But, that’s a long shot. DejaVu suffers from an almost done state without enough remaining work to interest designers). Regards, -- Nicolas Mailhot __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?
Le mercredi 08 avril 2020 à 02:55 -0700, Gabriel Becker a écrit : > Hi Paul, Hi Gabriel, Thanks a lot for the testing. > The various font family settings seem to work too, from what I can > tell. Both font families you suggested, however, Helvetica and Apple > Symbols (the s is important) have significantly incomplete coverage > with PUA on. That is to be expected, the AMS symbol dump in PUA space was a quick hack to make pre-unicode symbols available in an unicode world, pending their normalisation. That standardisation is long past (IIRC it occured by unicode 3.2 released in March 2002), so no newly created/updated font family is going to place those symbols in PUA anymore. Now adding the AMS symbols to new fonts has been slow, due to the large amount of software hardcoding Symbol (and equivallent) and masking the actual glyph userbase to font makers. It will accelerate with more apps expecting plain unicode by default. Thanks for the testing! Regards, -- Nicolas Mailhot __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel