fontconfig issueshttps://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues2021-08-31T02:30:09Zhttps://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/297Segmentation fault in fc-cache when font directory contains a subdirectory w...2021-08-31T02:30:09ZPatrick StorzSegmentation fault in fc-cache when font directory contains a subdirectory with more than five charactersThis certainly is a rather odd regression: If one of the font directories contains a subdirectory with five characters or more, fc-cache segfaults when attempting to scan this directory. For some reason fonts can not be looked up recursi...This certainly is a rather odd regression: If one of the font directories contains a subdirectory with five characters or more, fc-cache segfaults when attempting to scan this directory. For some reason fonts can not be looked up recursively anymore.
For example I just created a directory "abcde" in a directory scanned by fontconfig:
```
$ fc-cache -rv
Font directories:
E:/Temp/Inkscape/inkscape.git/master/build64/fonts
E:/Temp/Inkscape/inkscape.git/master/build64/fonts/abcde
E:/Temp/Inkscape/inkscape.git/master/build64/fonts: caching, new cache contents: 0 fonts, 1 dirs
E:/Temp/Inkscape/inkscape.git/master/build64/fonts\abcde: Segmentation fault
```
<details>
<summary>Backtrace:</summary>
```
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ffdda71a3ee in msvcrt!_strdup () from C:\WINDOWS\System32\msvcrt.dll
(gdb) bt
#0 0x00007ffdda71a3ee in msvcrt!_strdup ()
from C:\WINDOWS\System32\msvcrt.dll
#1 0x00007ffd77d4b06b in FcStrCopy (
s=s@entry=0xfeeefeeefeeefeee <error: Cannot access memory at address 0xfeeefeeefeeefeee>) at ../../fontconfig-2.13.94/src/fcstr.c:36
#2 0x00007ffd77d4c3fb in FcStrSetAdd (set=set@entry=0x2ac4d72a230,
s=s@entry=0xfeeefeeefeeefeee <error: Cannot access memory at address 0xfeeefeeefeeefeee>) at ../../fontconfig-2.13.94/src/fcstr.c:1367
#3 0x00007ffd77d4c9c3 in FcStrBuildFilename (
path=0xfeeefeeefeeefeee <error: Cannot access memory at address 0xfeeefeeefeeefeee>) at ../../fontconfig-2.13.94/src/fcstr.c:975
#4 0x00007ffd77d3c6a6 in FcDirCacheScan (
dir=dir@entry=0x2ac4ed65040 "E:/Temp/Inkscape/inkscape.git/master/build64/fonts\\abcde", config=config@entry=0x2ac4d729730)
at ../../fontconfig-2.13.94/src/fcdir.c:329
#5 0x00007ffd77d3c908 in FcDirCacheRead (
dir=dir@entry=0x2ac4ed65040 "E:/Temp/Inkscape/inkscape.git/master/build64/fonts\\abcde", force=force@entry=1, config=config@entry=0x2ac4d729730)
at ../../fontconfig-2.13.94/src/fcdir.c:462
#6 0x00007ff7c5361928 in scanDirs (list=list@entry=0x2ac4d72d2f0,
config=config@entry=0x2ac4d729730, force=force@entry=1,
really_force=really_force@entry=1, verbose=verbose@entry=1,
error_on_no_fonts=error_on_no_fonts@entry=0,
changed=changed@entry=0xf6b47ff85c)
at ../../fontconfig-2.13.94/fc-cache/fc-cache.c:229
#7 0x00007ff7c5361b3b in scanDirs (list=list@entry=0x2ac4d72a680,
config=config@entry=0x2ac4d729730, force=force@entry=1,
really_force=really_force@entry=1, verbose=verbose@entry=1,
error_on_no_fonts=error_on_no_fonts@entry=0,
changed=changed@entry=0xf6b47ff85c)
at ../../fontconfig-2.13.94/fc-cache/fc-cache.c:280
#8 0x00007ff7c5361eeb in main (argc=<optimized out>, argv=0x2ac4d7295c0)
at ../../fontconfig-2.13.94/fc-cache/fc-cache.c:429
```
</details>
Version info: mingw-w64-fontconfig 2.13.94-1 in MSYS2 environnment.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/292conf.d: include a Core Fonts for the Web substitutes2021-08-12T11:41:26ZKevin Degelingconf.d: include a Core Fonts for the Web substitutesIt feels a bit like this issue is ten years to late, and perhaps some others have already made similar requests, but I think it's very beneficial for the Linux ecosystem if we can define a base set of replacements for certain old Windows...It feels a bit like this issue is ten years to late, and perhaps some others have already made similar requests, but I think it's very beneficial for the Linux ecosystem if we can define a base set of replacements for certain old Windows fonts.
## Background
The story starts not long after I was born. Microsoft proposed a set of default fonts for the web and Christened them '[Core Fonts for the Web](https://en.wikipedia.org/wiki/Core_fonts_for_the_Web)'. This was not long before Microsoft got dragged into court for anti-competitive practices, after which terms like [Embrace, Extend, and Extinguish](https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguish) became part of our lingo.
## The issue
While it might sound like this is al ancient stuff... there are still web pages out there that use some of these core fonts. A shame for sure, but I also feel that we could do more to alleviate the issue: We could give all Linux users a basic set of replacements.
Summarizing the issue in one screenshot:
![Screenshot_from_2021-07-31_16-22-29](/uploads/830a6f350d7ca03a679f37e077f51cc4/Screenshot_from_2021-07-31_16-22-29.png)
(Fedora 34, Using Firefox 90 Flatpak)
### Missing sans-serif fallback
- Trebuchet MS
- Verdana
### Missing monospace fallback
- Andela
### Missing grotesque fallback
- Arial Black
- Impact
### Missing 'uhm' fallback
- Comic Sans
### Missing 'dingbat' fallback
- Webdings
## The proposal
```
30-core-fonts-for the-web-substitutes.conf
```
This should be a relatively straight forward file that properly assigns these fonts to a font-style, so that in their absence other fonts can be displayed. In spirit, this is almost the same as [30-metric-aliases.conf](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/conf.d/30-metric-aliases.conf) but of cause it deals with a set of different fonts. In that regard I also hope that my proposal isn't that controversial: There is already a list of fonts that we substitute, I'm only proposing to add ~10 fonts to that list for compatibility reasons. Somebody still has to use that Government website from the 90s.
### Example with single replacement file
![Screenshot_from_2021-07-31_17-13-04](/uploads/67d9c95825fd125d474934a07997c4ef/Screenshot_from_2021-07-31_17-13-04.png)
This issue came up as I was working on improving Flatpak's font support;
https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1274
## Discussion
I'm not sure what really sure is the process for getting such a change approved. Do you like the idea? Has this been proposed many times before?https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/291Add ‘PT Astra Serif’ as a metric alias of ‘Times New Roman’2021-07-28T18:04:42ZDaniel AleksandersenAdd ‘PT Astra Serif’ as a metric alias of ‘Times New Roman’TL;DR: Please add `PT Astra Serif` as a metric alias of `Times New Roman` to [`30-metric-aliases.conf`](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/d9c99340/conf.d/30-metric-aliases.conf).
`PT Astra Serif` and `PT Astra ...TL;DR: Please add `PT Astra Serif` as a metric alias of `Times New Roman` to [`30-metric-aliases.conf`](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/d9c99340/conf.d/30-metric-aliases.conf).
`PT Astra Serif` and `PT Astra Sans` were [developed as metric-compatible alternatives](https://web.archive.org/web/20181004103741/https://www.paratype.ru/cinfo/news.asp?NewsId=3469) to `Times New Roman` due to [U.S sanctions against Russia](https://www.themoscowtimes.com/2016/12/12/iconic-computer-font-times-new-roman-falls-victim-of-russia-us-sanctions-a56504). ([Reference comparison](https://github.com/google/fonts/issues/565#issuecomment-447290866).)
[Astra Linux](https://astralinux.ru/products/) ships with a metric alias for `PT Astra Serif` as the same as `Times New Roman`. They also include `PT Astra Sans` as an alias on that list. However, this is and sans-serif font and a poor visual match for `Times New Roman`. A subset of the PT font family is shipped by default in Apple macOS and iOS, and in Fedora Linux. Various parts of the font family is available for download through the package repositories of other distributions.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/289[feature request] CI test for compiling to WASM architecture target with Emsc...2021-08-20T09:31:50ZVadim Kantorov[feature request] CI test for compiling to WASM architecture target with EmscriptenFollowing https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/282 and https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/282#note_991212.
Even if the WASM target is not "supported" officially, having a regularly-run...Following https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/282 and https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/282#note_991212.
Even if the WASM target is not "supported" officially, having a regularly-run test / Emscripten compilation recipe is useful.
My example of building fontconfig with freetype/libexpat is here: https://github.com/busytex/busytex/blob/main/Makefile#L229 (as part of TexLive compilation sequence with Emscripten). Note the problems with specifying freetype includes/libs. The official switches did not work for me. Also note the hack for getting apinames compiled with host compiler. Maybe an explicit way of specifying cross-compiler/host-compiler (instead of relying on emmake) could be found to bypass this.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/288run-test.sh fails when using BSD mktemp (e.g. on macOS)2022-04-09T17:56:10ZRyan Carsten Schmidtrun-test.sh fails when using BSD mktemp (e.g. on macOS)When running `make check` on macOS 10.13.6 High Sierra with fontconfig latest git (post-2.13.94) run-test.sh fails:
```
FAIL: run-test.sh
PASS: test-bz89617
PASS: test-bz131804
PASS: test-bz96676
PASS: test-name-parse
PASS: run-test-con...When running `make check` on macOS 10.13.6 High Sierra with fontconfig latest git (post-2.13.94) run-test.sh fails:
```
FAIL: run-test.sh
PASS: test-bz89617
PASS: test-bz131804
PASS: test-bz96676
PASS: test-name-parse
PASS: run-test-conf.sh
PASS: test-bz106632
PASS: test-issue107
PASS: test-bz1744377
PASS: test-issue180
PASS: test-family-matching
============================================================================
Testsuite summary for fontconfig 2.13.94
============================================================================
# TOTAL: 11
# PASS: 10
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
============================================================================
See test/test-suite.log
Please report to https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new
============================================================================
make[4]: *** [test-suite.log] Error 1
make[3]: *** [check-TESTS] Error 2
make[2]: *** [check-am] Error 2
make[1]: *** [check] Error 2
make: *** [check-recursive] Error 1
```
test/test-suite.log contains:
```
=============================================
fontconfig 2.13.94: test/test-suite.log
=============================================
# TOTAL: 11
# PASS: 10
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: run-test
==============
mktemp: illegal option -- -
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
mktemp [-d] [-q] [-u] -t prefix
FAIL run-test.sh (exit status: 1)
```
Looks like run-test.sh runs `mktemp -d --tmpdir fontconfig.XXXXXXXX` in two places. `--tmpdir` is not an option that the BSD version of mktemp understands (not even on macOS 11 Big Sur).https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/285Naming issue with variable-weight font 'Public Sans'2022-02-04T11:27:16ZJohn PyeNaming issue with variable-weight font 'Public Sans'I have an issue with the font 'Public Sans' which seems to mess up in various ways on my Ubuntu 18.04 system with Gnome Font Viewer 3.28.0, libfreetype 2.8.1-2.ubuntu2.1 and fontconfig 2.12.6.
When I install the Public Sans font "Public...I have an issue with the font 'Public Sans' which seems to mess up in various ways on my Ubuntu 18.04 system with Gnome Font Viewer 3.28.0, libfreetype 2.8.1-2.ubuntu2.1 and fontconfig 2.12.6.
When I install the Public Sans font "PublicSans-VariableFont_wght.ttf" obtained from the zip file from https://fonts.google.com/specimen/Public+Sans, it appears in LibreOffice with the name "Public Sans Thin", not "Public Sans". When listed out using `fc-list`, it also shows the name "Public Sans Thin" for all weights, as well as "Public Sans" (see below). Finally, when I export a PDF from LibreOffice that uses multiple weights of this font, they all appear with the 'Thin' weighting, not the same (correct) weightings as seen in LibreOffice.
I first reported this with Gnome Font Viewer, then with freetype, then I was suggested to report here. See also: https://gitlab.gnome.org/GNOME/gnome-font-viewer/-/issues/22#note_1187385 and https://gitlab.freedesktop.org/freetype/freetype/-/issues/1067
At the moment, I have to conclude that this particular variable-weight font is completely unusable on Windows. This is a serious issue, since fonts like Public Sans are being increasingly used by users of the latest versions of MS Office, and editing these files on Linux is quite problematic.
```
john@thunder:~/ENGN8833$ fc-list | grep Public
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Thin
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=ExtraLight Italic
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Black
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Thin Italic,Italic
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=ExtraBold
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Bold
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Thin,Regular
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Bold Italic
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Regular
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=SemiBold
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Medium
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Light
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=ExtraBold Italic
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Light Italic
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Medium Italic
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=ExtraLight
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Black Italic
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Thin Italic
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=SemiBold Italic
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Italic
```https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/284Preferences ignoring aliases2021-07-01T23:37:45ZClément BœschPreferences ignoring aliasesThe Liberation font family has aliases defined in `30-metric-aliases.conf`. Typically, this means that `fc-match 'Times New Roman'` gives `LiberationSerif-Regular.ttf` as expected. Similarly, `fc-match Arial` gives `LiberationSans-Regula...The Liberation font family has aliases defined in `30-metric-aliases.conf`. Typically, this means that `fc-match 'Times New Roman'` gives `LiberationSerif-Regular.ttf` as expected. Similarly, `fc-match Arial` gives `LiberationSans-Regular.ttf`.
But now, looking at `60-latin.conf` preferences priorities for `serif` we have: `DejaVu Serif`, followed by `Times New Roman` and later down some `Nimbus`. Assuming DejaVu is not available, one would expect `fc-match serif` to raise `LiberationSerif-Regular.ttf` (since the 2nd preferred match is `Times New Roman` which aliases to `Liberation Serif`). Unfortunately:
```console
% fc-match serif --sort --verbose | grep family: | head -n15
family: "Nimbus Roman"(s)
family: "IPAMincho"(s) "IPA明朝"(s)
family: "Noto Serif"(s)
family: "Standard Symbols PS"(s)
family: "IPAmjMincho"(s) "IPAmj明朝"(s)
family: "IPAexGothic"(s) "IPAexゴシック"(s)
family: "Noto Sans Adlam"(s)
family: "Noto Sans Hebrew"(s)
family: "Noto Sans Warang Citi"(s)
family: "Noto Kufi Arabic"(s)
family: "Noto Sans Hanifi Rohingya"(s)
family: "Noto Sans Lisu"(s)
family: "Noto Sans Sora Sompeng"(s)
family: "Liberation Mono"(s)
family: "Liberation Sans"(s)
```
Similarly:
```console
% fc-match sans-serif --sort --verbose | grep family: | head -n15
family: "Nimbus Sans"(s)
family: "IPAGothic"(s) "IPAゴシック"(s)
family: "Noto Sans"(s)
family: "IPAmjMincho"(s) "IPAmj明朝"(s)
family: "IPAexGothic"(s) "IPAexゴシック"(s)
family: "Noto Sans Adlam"(s)
family: "Noto Sans Hebrew"(s)
family: "Noto Sans Warang Citi"(s)
family: "Noto Kufi Arabic"(s)
family: "Noto Sans Hanifi Rohingya"(s)
family: "Noto Sans Lisu"(s)
family: "Noto Sans Sora Sompeng"(s)
family: "Liberation Mono"(s)
family: "Liberation Sans"(s)
family: "Liberation Serif"(s)
```
What exactly is going on?
Is this related to https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/35 ?https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/280Whitelisting takes no precedence over blacklisting2021-06-21T13:10:21ZNiek van der MaasWhitelisting takes no precedence over blacklistingReading [this documentation](https://wiki.archlinux.org/title/font_configuration#Whitelisting_and_blacklisting_fonts) it appears that whitelisting should take precedence over blacklisting.
In other words, this should work:
```xml
<sel...Reading [this documentation](https://wiki.archlinux.org/title/font_configuration#Whitelisting_and_blacklisting_fonts) it appears that whitelisting should take precedence over blacklisting.
In other words, this should work:
```xml
<selectfont>
<!-- global blacklist of all fonts -->
<rejectfont>
<glob>/usr/share/fonts/*</glob>
</rejectfont>
<!-- whitelist specific fonts -->
<acceptfont>
<glob>/usr/share/fonts/fontfile.ttf</glob>
</acceptfont>
</selectfont>
```
Unfortunately this doesn't seem to be the case, with a config like above I get no fonts at all. Is there any other way to reject a glob and re-add specific fonts later?https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/279conf.d: priorities for Liberation and other fonts?2021-04-23T18:48:11Zmikhailnovconf.d: priorities for Liberation and other fonts?Seems that Liberation fonts (Liberation Sans, Serif, Mono) should be added to conf.d. These are very wide spread fonts.
Not only latin ones.
I have Liberation Mono installed but it is not used as "Monospace", see screenshot:
![image](...Seems that Liberation fonts (Liberation Sans, Serif, Mono) should be added to conf.d. These are very wide spread fonts.
Not only latin ones.
I have Liberation Mono installed but it is not used as "Monospace", see screenshot:
![image](/uploads/08b4c9064100974dd7f9ab8ef8fe8848/image.png)
(URL from screenshot: https://abf.io/soft/rosa-xfce-config/commit/423ac723d2aa4b0880580bb94678511774d238c7.patch)https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/278slant may be set to incorrect value if a font is just oblique but italic2021-04-09T05:21:31ZGreenYunslant may be set to incorrect value if a font is just oblique but italicI was dealing with a font that was designed to be Oblique style and named Regular while the Italic style of the same family is designed to be more slant. Fontconfig set `slant` to `FC_SLANT_ITALIC` when configuring these two font files, ...I was dealing with a font that was designed to be Oblique style and named Regular while the Italic style of the same family is designed to be more slant. Fontconfig set `slant` to `FC_SLANT_ITALIC` when configuring these two font files, thus, they were treat to be the same finally, and the Regular style font was omitted when I was going to match the font using the family name.
Of course I can write more rules to tell Fontconfig how to choose the font, but I don't think it a good way when dealing a lot of fonts.
Here is some information from the [OpenType Specification](https://docs.microsoft.com/en-us/typography/opentype/spec/os2):
> **Bit 9:**
>
> If bit 9 is set, then this font is to be considered an “oblique” style by processes which make a distinction between oblique and italic styles, such as Cascading Style Sheets font matching. For example, a font created by algorithmically slanting an upright face will set this bit.
>
> If a font has a version 4 or later OS/2 table and this bit is not set, then this font is not to be considered an “oblique” style. For example, a font that has a classic italic design will not set this bit.
>
> This bit, unlike the ITALIC bit (bit 0), is not related to style-linking in applications that assume a four-member font-family model comprised of regular, italic, bold and bold italic. It may be set or unset independently of the ITALIC bit. In most cases, if OBLIQUE is set, then ITALIC will also be set, though this is not required.
And some related codes from [here](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/6f27f42e6140030715075aa3bd3e5cc9e2fdc6f1/src/fcfreetype.c#L1954):
```C
/*
* Pull default values from the FreeType flags if more
* specific values not found above
*/
if (slant == -1)
{
slant = FC_SLANT_ROMAN;
if (face->style_flags & FT_STYLE_FLAG_ITALIC)
slant = FC_SLANT_ITALIC;
}
```
I am looking forward to some new codes that set `slant` to `FC_SLANT_OBLIQUE` as the font is just only oblique, or the font named Regular having oblique bit set. Also, please aware the content from the name table when doing font style detection, not just pulling the flags from FreeType.
There may be some helpful info from [this issue of FreeType](https://gitlab.freedesktop.org/freetype/freetype/-/issues/1044) and [this](https://gitlab.freedesktop.org/freetype/freetype/-/issues/1045) if developers of FreeType share some good idea dealing with oblique fonts.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/270Strange behaviour of fontconfig priority for 'Lohit Devanagari'2020-12-25T04:42:55ZGhost UserStrange behaviour of fontconfig priority for 'Lohit Devanagari'Some days ago, I installed _Lohit Devanagari_ font on my MX 19.3 box. Since then, I am experiencing strange behavior of fontconfig priority. I seen that _Lohit Devanagari_ is set default for Devanagari script, but not all apps obeying th...Some days ago, I installed _Lohit Devanagari_ font on my MX 19.3 box. Since then, I am experiencing strange behavior of fontconfig priority. I seen that _Lohit Devanagari_ is set default for Devanagari script, but not all apps obeying this rule. Instead of _Lohit Devanagari_, buggy _FreeSans_ font is being preferred, causing broken rendering of Devanagari. This issue is mainly affecting Chromium and Chromium based browsers.
The package _fonts-lohit-deva_ has two config files -
1. `/etc/fonts/conf.avail/59-lohit-devanagari.conf`
2. `/etc/fonts/conf.avail/66-lohit-devanagari.conf`
In these files, the first one is just a family substitution rule. The second one is responsible for setting _Lohit Devanagari_ as default font for Devanagari script. It has the following syntax -
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<test name="lang" compare="contains">
<string>hi</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>mr</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>kok</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>ks@devanagari</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>sd@devanagari</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>mai</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>ne</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>brx</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>doi</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>sa</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>sat</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Devanagari</string>
</edit>
</match>
<alias>
<family>Lohit Devanagari</family>
<default>
<family>sans-serif</family>
</default>
</alias>
</fontconfig>
```
I couldn't figure out what causing this problem, because, even things are set correctly to use _Lohit_, unifont is preferred over it. I have previously used Ubuntu 20.04.1 & Arch. They have no such issue, and _Lohit_ is correctly preferred. I checked Ubuntu and Arch fontconfig rules for any syntax changes but found that the code I am using is very similar to them...! 🤔
This issue seems to be affecting many Linux distros, because such problems have been discussed earlier on internet, especially for browsers.
Is it a bug ? Is it fixed previously in upstream ?
**Edit -** I have currently solved this problem by creating a local `fonts.conf` file. But, it should not require to do so.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/269fonts-conf(5): issues with automatic generation by docbook2man2021-08-12T06:03:28Zratijasfonts-conf(5): issues with automatic generation by docbook2manSeems like docbook2man isn't perfect when it comes to XML. Can't blame it for that, since XML is a mess anyway, but it goes.
Subsections in the **CONFIGURATION FILE FORMAT** section are wrong. They get uppercased (although subsections a...Seems like docbook2man isn't perfect when it comes to XML. Can't blame it for that, since XML is a mess anyway, but it goes.
Subsections in the **CONFIGURATION FILE FORMAT** section are wrong. They get uppercased (although subsections are usually lowercase), and converted to groff without proper quoting.
## Steps to reproduce
1. Open `man 5 fonts-conf`
2. Scroll down.
## Expected output
```xml
<include ignore_missing="no" prefix="default">
```
## Actual output
Rendered man page:
```
<INCLUDE IGNORE_MISSING= NO" PREFIX="DEFAULT">"
```
Groff source:
```txt
.SS "<INCLUDE IGNORE_MISSING=\&"NO\&" PREFIX=\&"DEFAULT\&">"
```
## Solution
The proper way to generate groff source for that is to char-escape double quotes. According to **groff_char**(7), ASCII double quote can be unambiguously represented as `\[dq]`.
```
.SS <include ignore_missing=\&\[dq]no\&\[dq] prefix=\&\[dq]default\&\[dq]>
```
Also, would be better to highlight attribute values with underline style, which in man pages often stands for user input placeholder. That would require breaking up `<literal> in source \*.sgml sources and possibly inventing new elements.
![image](/uploads/cd0394c4b27fd7c6844be50077cc14c5/image.png)https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/258fc-cache failing on macOS 10.15 Catalina with non-writable $PREFIX/var2022-11-24T01:46:20ZAndrew Jankefc-cache failing on macOS 10.15 Catalina with non-writable $PREFIX/varHi, fontconfig folks.
I'm using fontconfig in a non-standard setup on macOS as part of bundling it into Octave.app (http://octave-app.org/), a "native Mac app" distribution of GNU Octave. To build this app, I install Homebrew into a non...Hi, fontconfig folks.
I'm using fontconfig in a non-standard setup on macOS as part of bundling it into Octave.app (http://octave-app.org/), a "native Mac app" distribution of GNU Octave. To build this app, I install Homebrew into a non-default prefix of `/Applications/Octave-6.0.90.app/Contents/Resources/usr`. Because Mac app bundles (especially signed ones) are supposed to be non-modifiable, I symlink the `var/` under that prefix (`/Applications/Octave-6.0.90.app/Contents/Resources/usr/var`) to the system `/var`.
I'm doing this on macOS 10.15.6, and when run in this configuration, fc-cache errors out.
Running a regular Homebrewed fc-cache from `/usr/local`:
```
janke@catawba ~ % sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.6
BuildVersion: 19G2021
janke@catawba ~ % which fc-cache
/usr/local/bin/fc-cache
janke@catawba ~ % fc-cache --version
fontconfig version 2.13.1
janke@catawba ~ % fc-cache -frv
/usr/share/fonts: skipping, no such directory
/System/Library/Fonts: caching, new cache contents: 523 fonts, 1 dirs
/System/Library/Fonts/Supplemental: caching, new cache contents: 440 fonts, 0 dirs
/Library/Fonts: Unable to revert mtime: /Library/Fonts
caching, new cache contents: 1 fonts, 0 dirs
/Users/janke/Library/Fonts: caching, new cache contents: 0 fonts, 0 dirs
/System/Library/AssetsV2/com_apple_MobileAsset_Font6: caching, new cache contents: 0 fonts, 0 dirs
/Users/janke/.local/share/fonts: skipping, no such directory
/Users/janke/.fonts: skipping, no such directory
/System/Library/Fonts/Supplemental: skipping, looped directory detected
/usr/local/var/cache/fontconfig: cleaning cache directory
/Users/janke/.cache/fontconfig: not cleaning non-existent cache directory
/Users/janke/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded
janke@catawba ~ % echo $?
0
janke@catawba ~ %
```
When I run it from the Octave.app prefix, it errors out:
```
janke@catawba ~ % /Applications/Octave-6.0.90.app/Contents/Resources/usr/bin/fc-cache --version
fontconfig version 2.13.1
janke@catawba ~ % /Applications/Octave-6.0.90.app/Contents/Resources/usr/bin/fc-cache -frv
/usr/share/fonts: skipping, no such directory
/System/Library/Fonts: caching, new cache contents: 523 fonts, 1 dirs
/System/Library/Fonts/Supplemental: caching, new cache contents: 440 fonts, 0 dirs
/Library/Fonts: Unable to revert mtime: /Library/Fonts
caching, new cache contents: 1 fonts, 0 dirs
/Users/janke/Library/Fonts: caching, new cache contents: 0 fonts, 0 dirs
/Users/janke/Library/Fonts: failed to write cache
/System/Library/Assets/com_apple_MobileAsset_Font5: skipping, no such directory
/Users/janke/.local/share/fonts: skipping, no such directory
/Users/janke/.fonts: skipping, no such directory
/System/Library/Fonts/Supplemental: skipping, looped directory detected
/Users/janke/.cache/fontconfig: cleaning cache directory
/Users/janke/.fontconfig: not cleaning non-existent cache directory
/Applications/Octave-6.0.90.app/Contents/Resources/usr/bin/fc-cache: failed
janke@catawba ~ % echo $?
1
janke@catawba ~ %
```
It says "failed", but there doesn't seem to be an error message indicating why it failed. Could one be added to make diagnosing this issue easier?
I'm guessing maybe it failed because it was expecting to write into the var that's symlinked to /var, but that's non-writable? But it used to succeed on earlier versions of macOS, and I don't think /var is writable there either?
After it runs and fails in this manner, there's a `~/.cache/fontconfig` directory, with just a few files in it.
```
janke@catawba ~ % ls ~/.cache/fontconfig
A7E5855D-8E03-4C9A-AB6B-E79147F4A73F-le64.cache-7
CACHEDIR.TAG
b0a71e6bf6a8a1a908413a823d76e21f-le64.cache-7
c6cafe6b1a56ed8b739253d6df90ca6a-le64.cache-7
janke@catawba ~ %
```
Is that expected? Is this a default fallback location that it uses when $PREFIX/var is not writable?
Maybe the non-writable /var is a red herring then, and it's erroring out for some other reason?
Also, what's this complaint about not reverting the mtime on the system `/Library/Fonts` about? Should it be trying to do that?
```
janke@catawba ~ % /Applications/Octave-6.0.90.app/Contents/Resources/usr/bin/fc-cache -frv 1>/dev/null
Unable to revert mtime: /Library/Fonts
janke@catawba ~ %
```
Thanks for any guidance you can give me!https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/255Consider caching charset subset relation2020-08-23T16:08:11ZMatthias ClasenConsider caching charset subset relationI have code here that computes the FcCharSetIsSubset relations for all fonts
in the current configuration, saves that data to a file, and loads it again:
https://gitlab.gnome.org/GNOME/pango/-/merge_requests/229
That makes coverage tri...I have code here that computes the FcCharSetIsSubset relations for all fonts
in the current configuration, saves that data to a file, and loads it again:
https://gitlab.gnome.org/GNOME/pango/-/merge_requests/229
That makes coverage trimming much cheaper, since most of the charset comparisons
can be avoided. The code probably belongs into fontconfig, but I don't have
the energy to rewrite it and figure out how to integrate it into fc-cache.
It is slighty tricky, since it is global information, not per-directory.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/247meson: compilation failure on Windows, msys2 + mingw-w64 without native gperf2022-05-16T06:18:40Zvtorrimeson: compilation failure on Windows, msys2 + mingw-w64 without native gperftrying to compile fc with msys2 + mingw-w64
meson and build command :
```
meson .. --prefix=/opt/fontconfig_64 --buildtype=debugoptimized --default-library shared -Ddoc=enabled -Dnls=enabled
ninja -j1
```
output :
```
The Meson bui...trying to compile fc with msys2 + mingw-w64
meson and build command :
```
meson .. --prefix=/opt/fontconfig_64 --buildtype=debugoptimized --default-library shared -Ddoc=enabled -Dnls=enabled
ninja -j1
```
output :
```
The Meson build system
Version: 0.54.2
Source dir: C:/Documents/msys2/home/vincent.torri/gitroot_64/fontconfig
Build dir: C:/Documents/msys2/home/vincent.torri/gitroot_64/fontconfig/builddir
Build type: native build
Using 'PKG_CONFIG_PATH' from environment with value: 'C:\\Documents\\msys2\\opt\\ewpi_64\\lib\\pkgconfig;C:\\Documents\\msys2\\opt\\efl_64\\lib\\pkgconfig'
Using 'PKG_CONFIG_PATH' from environment with value: 'C:\\Documents\\msys2\\opt\\ewpi_64\\lib\\pkgconfig;C:\\Documents\\msys2\\opt\\efl_64\\lib\\pkgconfig'
Project name: fontconfig
Project version: 2.13.91
Using 'CFLAGS' from environment with value: '-Og -g3 -ggdb3 -pipe'
Using 'LDFLAGS' from environment with value: '-LC:/Documents/msys2/opt/ewpi_64/lib'
Using 'CPPFLAGS' from environment with value: '-IC:/Documents/msys2/opt/ewpi_64/include -DECORE_WIN32_WIP_POZEFLKSD'
Using 'CFLAGS' from environment with value: '-Og -g3 -ggdb3 -pipe'
Using 'LDFLAGS' from environment with value: '-LC:/Documents/msys2/opt/ewpi_64/lib'
Using 'CPPFLAGS' from environment with value: '-IC:/Documents/msys2/opt/ewpi_64/include -DECORE_WIN32_WIP_POZEFLKSD'
C compiler for the host machine: cc (gcc 10.1.0 "cc (Rev2, Built by MSYS2 project) 10.1.0")
C linker for the host machine: cc ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: C:\Documents\msys2\opt\ewpi_64\bin/pkg-config.EXE (1.7.3)
Using 'PKG_CONFIG_PATH' from environment with value: 'C:\\Documents\\msys2\\opt\\ewpi_64\\lib\\pkgconfig;C:\\Documents\\msys2\\opt\\efl_64\\lib\\pkgconfig'
Run-time dependency freetype2 found: YES 23.2.17
Using 'PKG_CONFIG_PATH' from environment with value: 'C:\\Documents\\msys2\\opt\\ewpi_64\\lib\\pkgconfig;C:\\Documents\\msys2\\opt\\efl_64\\lib\\pkgconfig'
Run-time dependency expat found: YES 2.2.9
Program python3 found: YES (c:/documents/msys2/mingw64/bin/python.exe)
Has header "dirent.h" : YES
Has header "fcntl.h" : YES
Has header "stdlib.h" : YES
Has header "string.h" : YES
Has header "unistd.h" : YES
Has header "sys/statvfs.h" : NO
Has header "sys/vfs.h" : NO
Has header "sys/statfs.h" : NO
Has header "sys/param.h" : YES
Has header "sys/mount.h" : NO
Checking for function "link" : NO
Checking for function "mkstemp" : YES
Checking for function "mkostemp" : NO
Checking for function "_mktemp_s" : YES
Checking for function "mkdtemp" : NO
Checking for function "getopt" : YES
Checking for function "getopt_long" : YES
Checking for function "getprogname" : NO
Checking for function "getexecname" : NO
Checking for function "rand" : YES
Checking for function "random" : NO
Checking for function "lrand48" : NO
Checking for function "random_r" : NO
Checking for function "rand_r" : NO
Checking for function "readlink" : NO
Checking for function "fstatvfs" : NO
Checking for function "fstatfs" : NO
Checking for function "lstat" : NO
Checking for function "mmap" : NO
Checking for function "vprintf" : YES
Checking for function "FT_Get_BDF_Property" with dependency freetype2: YES
Checking for function "FT_Get_PS_Font_Info" with dependency freetype2: YES
Checking for function "FT_Has_PS_Glyph_Names" with dependency freetype2: YES
Checking for function "FT_Get_X11_Font_Format" with dependency freetype2: YES
Checking for function "FT_Done_MM_Var" with dependency freetype2: YES
Header <fcntl.h> has symbol "posix_fadvise" : NO
Checking whether type "struct statvfs" has member "f_basetype" : NO
Checking whether type "struct statvfs" has member "f_fstypename" : NO
Checking whether type "struct statfs" has member "f_flags" : NO
Checking whether type "struct statfs" has member "f_fstypename" : NO
Checking whether type "struct dirent" has member "d_type" : NO
Checking for size of "void *" : 8
Checking for alignment of "void *" : 8
Checking for alignment of "double" : 8
Checking if "Intel atomics" links: YES
Checking if "Solaris atomic ops" links: NO
Program gperf found: YES (C:\Documents\msys2\usr\bin/gperf.EXE)
Program sh found: YES (C:\Documents\msys2\usr\bin/sh.EXE)
Message: gperf len type is size_t
Checking for type "uint64_t" : YES
Checking for type "int32_t" : YES
Checking for type "uintptr_t" : YES
Checking for type "intptr_t" : YES
Program fc-case.py found: YES (c:/documents/msys2/mingw64/bin/python.exe C:/Documents/msys2/home/vincent.torri/gitroot_64/fontconfig/fc-case/fc-case.py)
Program fc-lang.py found: YES (c:/documents/msys2/mingw64/bin/python.exe C:/Documents/msys2/home/vincent.torri/gitroot_64/fontconfig/fc-lang/fc-lang.py)
Configuring fontconfig.def using configuration
Program link_confs.py found: YES (c:/documents/msys2/mingw64/bin/python.exe C:/Documents/msys2/home/vincent.torri/gitroot_64/fontconfig/conf.d/link_confs.py)
Program write-35-lang-normalize-conf.py found: YES (c:/documents/msys2/mingw64/bin/python.exe C:/Documents/msys2/home/vincent.torri/gitroot_64/fontconfig/conf.d/write-35-lang-normalize-conf.py)
Configuring README using configuration
Program xgettext found: YES (C:\Documents\msys2\mingw64\bin/xgettext.EXE)
Program docbook2man found: NO
Program docbook2txt found: NO
Program docbook2pdf found: NO
Program docbook2html found: NO
Program run-quiet.py found: YES (c:/documents/msys2/mingw64/bin/python.exe C:/Documents/msys2/home/vincent.torri/gitroot_64/fontconfig/doc/run-quiet.py)
Program extract-man-list.py found: YES (c:/documents/msys2/mingw64/bin/python.exe C:/Documents/msys2/home/vincent.torri/gitroot_64/fontconfig/doc/extract-man-list.py)
Program edit-sgml.py found: YES (c:/documents/msys2/mingw64/bin/python.exe C:/Documents/msys2/home/vincent.torri/gitroot_64/fontconfig/doc/edit-sgml.py)
Configuring version.sgml using configuration
Configuring confdir.sgml using configuration
Configuring config.h using configuration
Configuring fonts.conf using configuration
Program install-cache.py found: YES (c:/documents/msys2/mingw64/bin/python.exe C:/Documents/msys2/home/vincent.torri/gitroot_64/fontconfig/install-cache.py)
Build targets in project: 52
Found ninja.EXE-1.10.0 at C:\Documents\msys2\mingw64\bin/ninja.EXE
[1/69] Generating fclang.h with a custom command
[2/69] Generating fccase.h with a custom command
[3/69] Generating alias_headers with a custom command
[4/69] Generating ft_alias_headers with a custom command
[5/69] Generating fcobjshash.gperf with a custom command
src/fcobjshash.gperf
[6/69] Generating fcobjshash.h with a custom command
FAILED: src/fcobjshash.h
"C:/Documents/msys2/usr/bin/gperf.EXE" "--pic" "-m" "100" "src/fcobjshash.gperf" "--output-file" "src/fcobjshash.h"
src/fcobjshash.gperf:17: warning: junk after %% is ignored
src/fcobjshash.gperf:2: warning: junk after %} is ignored
src/fcobjshash.gperf:3: junk after declaration
ninja: build stopped: subcommand failed.
```
the gperf used is the one installed for msys itself in /usr/bin
after installing the native gperf (pacman -S mingw-w64-x86_64-gperf), the compilation was successful (with some warnings)
i would say that for compilation with msys2, the installation of this gperf is mandatory. Maybe mentioning this in INSTALL file.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/246Follow-up from "Add support for Meson build system": hook up run-test.sh base...2020-07-18T17:58:24ZTim-Philipp Müllertim@centricular.comFollow-up from "Add support for Meson build system": hook up run-test.sh based testsThe following discussion from !87 should be addressed:
- [ ] @tagoh started a [discussion](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/87#note_555340): (+1 comment)
> No way to run a shell script based te...The following discussion from !87 should be addressed:
- [ ] @tagoh started a [discussion](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/87#note_555340): (+1 comment)
> No way to run a shell script based tests under meson/ninja?https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/242Oddness in the classification of FreeSans2020-07-01T06:03:37ZMorgan SOddness in the classification of FreeSansIn `fc-match -a 'monospace'`, I cannot fathom why FreeSans appears where it does, and I have been unable to remove it.
I want my "monospace" generic font to be `MotoyaLCedar → serif [Gentium → 一点明朝CP ...] → HanaMinB`.
Instead, in `...In `fc-match -a 'monospace'`, I cannot fathom why FreeSans appears where it does, and I have been unable to remove it.
I want my "monospace" generic font to be `MotoyaLCedar → serif [Gentium → 一点明朝CP ...] → HanaMinB`.
Instead, in `fc-match -a 'monospace'`, I see `MotoyaLCedar → HanaMinB → FreeSans → serif (?)`. The ordering is not expected.
Besides the odd ordering of "serif" (which may be another issue, but refrain for now), FreeSans should not be here.
I tried to classify FreeSans as "fantasy", which had no effect. I tried to declassify all fonts as "sans-serif", in case it is from the Fontconfig pre-installed classification, which had no effect.
I have run `fc-cache -fv` after every modification of my personal `fonts.conf`.
(And please ignore the odd font stack: I pruned the configuration for this issue, and my usual font stack is not as weird!)
----
Environment: Debian; fontconfig / libfontconfig1 / fontconfig-config 2.13.1-4.2
----
Attempt to declassify fonts as sans-serif (I have tried numerous modifications, this is just one):
```
<match>
<test qual="any" name="family" compare="eq">
<string>sans-serif</string>
</test>
<edit name="family" mode="delete" binding="strong">
</edit>
</match>
```
```
$ fc-match -a 'monospace'
MTLc3m.ttf: "モトヤLシータ゛3等幅" "Regular"
gw1796547.ttf: "花園明朝B" "Regular"
FreeSans.ttf: "FreeSans" "Regular"
I.MingCP-6.12.ttf: "一点明朝CP" "レギュラー"
GentiumPlus-R.ttf: "Gentium Plus" "Regular"
GenSekiGothic-R.ttc: "GenSekiGothic TW" "R"
_NanumBarunGothic-YetHangul.ttf: "NanumBarunGothic YetHangul" "Regular"
_NanumMyeongjo-YetHangul.ttf: "NanumMyeongjo YetHangul" "Regular"
GenSekiGothic-M.ttc: "GenSekiGothic TW" "M"
GenSekiGothic-L.ttc: "GenSekiGothic TW" "L"
FreeSansBold.ttf: "FreeSans" "Bold"
GenSekiGothic-B.ttc: "GenSekiGothic TW" "B"
GenSekiGothic-H.ttc: "GenSekiGothic TW" "H"
FreeSansOblique.ttf: "FreeSans" "Oblique"
GentiumPlus-I.ttf: "Gentium Plus" "Italic"
FreeSansBoldOblique.ttf: "FreeSans" "Bold Oblique"
```
```
$ fc-match -a 'serif'
GentiumPlus-R.ttf: "Gentium Plus" "Regular"
GentiumPlus-I.ttf: "Gentium Plus" "Italic"
I.MingCP-6.12.ttf: "一点明朝CP" "レギュラー"
_NanumMyeongjo-YetHangul.ttf: "NanumMyeongjo YetHangul" "Regular"
FreeSans.ttf: "FreeSans" "Regular"
MTLc3m.ttf: "モトヤLシータ゛3等幅" "Regular"
GenSekiGothic-R.ttc: "GenSekiGothic TW" "R"
_NanumBarunGothic-YetHangul.ttf: "NanumBarunGothic YetHangul" "Regular"
GenSekiGothic-M.ttc: "GenSekiGothic TW" "M"
gw1796547.ttf: "花園明朝B" "Regular"
GenSekiGothic-L.ttc: "GenSekiGothic TW" "L"
FreeSansBold.ttf: "FreeSans" "Bold"
GenSekiGothic-B.ttc: "GenSekiGothic TW" "B"
GenSekiGothic-H.ttc: "GenSekiGothic TW" "H"
FreeSansOblique.ttf: "FreeSans" "Oblique"
FreeSansBoldOblique.ttf: "FreeSans" "Bold Oblique"
```
`~/.config/fontconfig/fonts.conf`:
```xml
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--serif-->
<alias><family>Gentium Plus</family><accept><family>serif</family></accept></alias>
<alias><family>serif</family><prefer><family>Gentium Plus</family></prefer></alias>
<alias><family>I.MingCP</family><accept><family>serif</family></accept></alias>
<alias><family>serif</family><prefer><family>I.MingCP</family></prefer></alias>
<alias><family>NanumMyeongjo YetHangul</family><accept><family>serif</family></accept></alias>
<alias><family>serif</family><prefer><family>NanumMyeongjo YetHangul</family></prefer></alias>
<!--sans-serif-->
<alias><family>GenSekiGothic TW</family><accept><family>sans-serif</family></accept></alias>
<alias><family>sans-serif</family><prefer><family>GenSekiGothic TW</family></prefer></alias>
<alias><family>NanumBarunGothic YetHangul</family><accept><family>sans-serif</family></accept></alias>
<alias><family>sans-serif</family><prefer><family>NanumBarunGothic YetHangul</family></prefer></alias>
<!--monospace-->
<alias><family>MotoyaLCedar</family><accept><family>monospace</family></accept></alias>
<alias><family>monospace</family><prefer><family>MotoyaLCedar</family></prefer></alias>
<alias><family>monospace</family><prefer><family>serif</family></prefer></alias> <!--temp-->
<alias><family>HanaMinB</family><accept><family>monospace</family></accept></alias>
<alias><family>monospace</family><prefer><family>HanaMinB</family></prefer></alias>
<!--fantasy-->
<alias><family>FreeSans</family><accept><family>fantasy</family></accept></alias>
<alias><family>fantasy</family><prefer><family>FreeSans</family></prefer></alias>
<!--x-->
<match>
<edit name="lang" mode="delete_all">
</edit>
</match>
</fontconfig>
```https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/241Seems 2.13.92 tag never made it to any branch2020-06-26T07:54:33ZPhilip MüllerSeems 2.13.92 tag never made it to any branchSeems commit b1df1101a643ae16cdfa1d83b939de2497b1bf27 of fontconfig
never made it into a branch, therefore the tag 2.13.92 is not listed with:
```
[phil@development fontconfig]$ git describe --tags
2.13.91-48-gfcb0420
```
However you s...Seems commit b1df1101a643ae16cdfa1d83b939de2497b1bf27 of fontconfig
never made it into a branch, therefore the tag 2.13.92 is not listed with:
```
[phil@development fontconfig]$ git describe --tags
2.13.91-48-gfcb0420
```
However you see it when you search for it:
```
[phil@development fontconfig]$ git tag --list | grep 2.13
2.13.0
2.13.1
2.13.91
2.13.92
```
The outdated github mirror [claims this](https://github.com/freedesktop/fontconfig/commit/b1df110):
This commit does not belong to any branch on this repository.
This reflects also 2.13.91 been listed as still current version in master branch:
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/master/fontconfig/fontconfig.h#L56
Do we therefore only miss fcb0420 or maybe other parts of 2.13.92 in 'master' branch?
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/236https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/224Please allow quirkless fc-scan use in rootless mode2020-10-21T11:59:19ZNicolas MailhotPlease allow quirkless fc-scan use in rootless modeTo create robust config files that do not accidentally depend on other files already present on the system, I’d like to run fc-scan in rootless mode, to check what fontconfig thinks of a fileset, absent any configuration.
The closest wa...To create robust config files that do not accidentally depend on other files already present on the system, I’d like to run fc-scan in rootless mode, to check what fontconfig thinks of a fileset, absent any configuration.
The closest way I’ve found to achieve that is:
```console
$ FONTCONFIG_SYSROOT=/dev/null fc-scan…
```
However fc-scan will then output a:
`Fontconfig error: Cannot load default config file: No such file: (null)`
That’s quite annoying and requires additional scripting to inhibit (and then you either inhibit all stderr, which is dangerous, or this specific line, which is not future-proof).
Please provide some way to explicitly run fc-scan in rootless mode without quirky errorshttps://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/223Please expose the CSS name of a font face2020-02-18T11:29:15ZNicolas MailhotPlease expose the CSS name of a font faceBecause CCS4 mandates width weight slant keyword naming derived from width weight slant values, but a lot of font makers ignore OpenType and CSS recommandations, and fontconfig messes up with the width weight slant scales used in specifi...Because CCS4 mandates width weight slant keyword naming derived from width weight slant values, but a lot of font makers ignore OpenType and CSS recommandations, and fontconfig messes up with the width weight slant scales used in specifications, it is not easy for the user to determine what is the CSS naming of installed font faces.
Please expose in fc-scan the width weight slant CSS keywords associated with an installed face:
1. when they match perfectly (exact value specified in the spec): css-width, css-weight, css-stretch (one value or none per property)
2. when they do not match perfectly, but would be aliased by the CSS resolution algorithm to this face, given the other faces available on system for this font family: css-width-aliases, css-weight-aliases, css-stretch aliases
For example, if a font family is available with the 350 and 700 weights:
- CSS would name the width for 700 Bold and make it an alias for ExtraBold, Black, SemiBold and Medium
- CSS would not have a canonical name for 350 but would make it an alias for Thin, ExtraLight, Light and Regular
The CSS spec is somewhat inconsistent with its keyword naming (sometimes in lowercase, sometimes in camelcase, sometimes with spaces), it’s ok to deviate a little from the letter of the spec to keep the way keywords are written consistent.
The aim is to give fontconfig users a clear idea of what a face would have been named if the font maker had applied the CSS model, how CSS/Web oriented software will name it, what CSS/web software will substitute it for
Since variable fonts enable the creation of more faces than defined by the CSS model some faces may end up with no CSS name (either canonical or aliased). CSS naming is not intended as a direct replacement of the style fontconfig field.