fontconfig issueshttps://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues2023-08-10T11:33:08Zhttps://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/379fontconfig cache directory on windows2023-08-10T11:33:08ZZUHONG TAOfontconfig cache directory on windowsfontconfig will create a cache directory on the root of app installed driver
![image](/uploads/5cff8544853cc0691d39ec75544f9a0c/image.png)
it should be created in the temp directory or with a hidden propertyfontconfig will create a cache directory on the root of app installed driver
![image](/uploads/5cff8544853cc0691d39ec75544f9a0c/image.png)
it should be created in the temp directory or with a hidden propertyhttps://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/375Provide a way to detect WOFF/WOFF2 fonts2023-08-09T11:02:06ZKhaled HosnyProvide a way to detect WOFF/WOFF2 fontsRelated to #92
Some distributions install WOFF and WOFF2 fonts in directories indexed by FontConfig and FontConfig will list them like any other format it supports.
Applications that don’t support WOFF/WOFF2 fonts, however, have no si...Related to #92
Some distributions install WOFF and WOFF2 fonts in directories indexed by FontConfig and FontConfig will list them like any other format it supports.
Applications that don’t support WOFF/WOFF2 fonts, however, have no simple way of detecting such fonts and filtering them out. The `FC_FONTFORMAT` of the pattern reports the format of the uncompressed font file and there is no indication that it is a WOFF/WOFF2 file.
Applications are left with either:
- Filtering based on file extension, which is brittle
- Sniffing the format by opening the file and reading its header, which is likely to be slow, and applications might need to cache it, defeating the one of the benefits of using FontConfig.
I think either `FC_FONTFORMAT` should be extended to report also WOFF/WOFF2, e.g. `WOFF-CFF`, `WOFF-TTF`, and so on, or a new property, e.g., `FC_FONTCONTAINER` or some such would be supoprted. The later might even be help distingush naked CFF fonts from CFF in SFNT fonts as currently both report font format of `CFF`.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/374Memory access fault in FcConfigSubstituteWithPat2023-07-28T09:27:25ZAndreas FalkenhahnMemory access fault in FcConfigSubstituteWithPatThere's a memory access fault in `FcConfigSubstituteWithPat` in case one of the following calls to `malloc` fails:
```
value = (FcValueList **) malloc (SIZEOF_VOID_P * nobjs);
if (!value)
{
retval = FcFalse;
goto bail1;
...There's a memory access fault in `FcConfigSubstituteWithPat` in case one of the following calls to `malloc` fails:
```
value = (FcValueList **) malloc (SIZEOF_VOID_P * nobjs);
if (!value)
{
retval = FcFalse;
goto bail1;
}
elt = (FcPatternElt **) malloc (SIZEOF_VOID_P * nobjs);
if (!elt)
{
retval = FcFalse;
goto bail1;
}
tst = (FcTest **) malloc (SIZEOF_VOID_P * nobjs);
if (!tst)
{
retval = FcFalse;
goto bail1;
}
```
The memory access fault is caused by the fact that in `bail1` we have this:
```
bail1:
FamilyTableClear (&data);
```
But `data` is initialized *after* the `malloc` calls quoted above, thus a call to `FamilyTableClear` will cause a memory access fault. I don't know how to post merge requests here so I'm just posting my fix. We just have to initialize `data` before any gotos to `bail1`, e.g. like this:
```
FamilyTableInit (&data, p); // --> I moved this line to here!
nobjs = FC_MAX_BASE_OBJECT + config->maxObjects + 2;
value = (FcValueList **) malloc (SIZEOF_VOID_P * nobjs);
if (!value)
{
retval = FcFalse;
goto bail1;
}
elt = (FcPatternElt **) malloc (SIZEOF_VOID_P * nobjs);
if (!elt)
{
retval = FcFalse;
goto bail1;
}
tst = (FcTest **) malloc (SIZEOF_VOID_P * nobjs);
if (!tst)
{
retval = FcFalse;
goto bail1;
}
if (FcDebug () & FC_DBG_EDIT)
{
printf ("FcConfigSubstitute ");
FcPatternPrint (p);
}
```Akira TAGOHAkira TAGOHhttps://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/351FC_FILE incorrect in sandbox container(flatpak)2023-07-21T04:38:05ZcatsoutFC_FILE incorrect in sandbox container(flatpak)`FC_FILE` is used by wine to get font file path, but it's incorrect in flatpak.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2081
https://github.com/flatpak/flatpak/issues/5307
```
bind mount:
/run/host/fonts <- /usr...`FC_FILE` is used by wine to get font file path, but it's incorrect in flatpak.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2081
https://github.com/flatpak/flatpak/issues/5307
```
bind mount:
/run/host/fonts <- /usr/share/fonts
/run/host/user-fonts <- ~/.local/share/fonts
/run/host/fonts-cache <- /usr/lib/fontconfig/cache
/run/host/user-fonts-cache <- ~/.cache/fontconfig
FcConfigGetFontDirs( config ) -> /run/host/user-fonts/test,...
FcDirCacheRead( /run/host/user-fonts/test, ... ) -> FcCacheCopySet -> pattern
FcPatternGetString( pattern, FC_FILE, 0, &filename ) ->` ~/.local/share/fonts/test/test.ttf`
```
`~/.local/share/fonts/test/test.ttf` is incorrect in container.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/373Typos in fc-conflist.sgml2023-07-15T07:34:27ZpellTypos in fc-conflist.sgmlThere are a couple of typos in fc-conflist.sgml which I'm supposing is where the same issue in the man page originates.
The phrase:
`how fontconfig acautlly process them`
Should read:
`how fontconfig actually processes them`
Edit: I'v...There are a couple of typos in fc-conflist.sgml which I'm supposing is where the same issue in the man page originates.
The phrase:
`how fontconfig acautlly process them`
Should read:
`how fontconfig actually processes them`
Edit: I've attached a patch with the correction.
[fc-conflist.sgml.patch]
(/uploads/5d164fee889a3c0f8039dd27743885ef/fc-conflist.sgml.patch)https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/370Fontconfig error: Cannot load default config file: No such file: (null)2023-06-28T12:50:17ZRaizencorpFontconfig error: Cannot load default config file: No such file: (null)Hi,
I'm new to FontConfig so i don't understand fully the library. But i'm developping an app in python that need to convert html to pdf using weasyprint with a twist. I'm creating a standalone with pyinstaller on windows. So as i under...Hi,
I'm new to FontConfig so i don't understand fully the library. But i'm developping an app in python that need to convert html to pdf using weasyprint with a twist. I'm creating a standalone with pyinstaller on windows. So as i understood i need gtk3 to get the /etc/fonts files and directory, and pango from this Lastest installer (found on weasyprint doc): https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases
As i backtrace my FontConfig error, i ended up seeing that fc actualy was creating the config and not looking for my fonts.conf (or i got lost somewhere) with fcConfigCreate() in fccfg.c. And create the struct like config.
The thing is, i try to access the variable like `configFiles` but i only get a memory address not useful hahaha
Would anyone care to explain how this conf file works, and where is it looking for ?https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/368Everything in conf.avail is applied, even when using FONTCONFIG_FILE2023-06-21T12:20:43ZMark HillsEverything in conf.avail is applied, even when using FONTCONFIG_FILEI set FONTCONFIG_FILE to override the config, but the entire contents of the system `/usr/share/fontconfig/conf.avail` are processed.
I've used this for many years to have my own font config without root access or modifying installed pa...I set FONTCONFIG_FILE to override the config, but the entire contents of the system `/usr/share/fontconfig/conf.avail` are processed.
I've used this for many years to have my own font config without root access or modifying installed packages, and sometimes per-application settings.
Recently I noticed the system config affecting the font settings, but I don't know when this began.
There seems to be some kind of 'modal' behaviour here depending on whether FONTCONFIG_FILE is unset, set, or does not exist -- note the flipping between `/usr/share/fontconfig` and `/etc/fonts` in the logs below. I haven't traced the source code to see why. The two distros I tested both seem to have duplicates of the files.
This negates much of the `conf.d` -> `conf.avail` symlinking, if all the files are being read?
If `FONTCONFIG_FILE` still reads the system config then I imagine this may interfere with the test cases in the source code?
The logs below are from Alpine Linux, but I tested `fc-conflist` on:
* Alpine Linux 3.18 (fontconfig-2.14.2-r3)
* Slackware 15.0 (fontconfig-2.13.92-x86_64-3)
```
$ FONTCONFIG_FILE=$HOME/.fonts.conf fc-conflist
+ /home/mark/.fonts.conf: No description
- /usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf: Re-define fonts dirs sample
- /usr/share/fontconfig/conf.avail/09-autohint-if-no-hinting.conf: Enable autohinter if font doesn't have any hinting
- /usr/share/fontconfig/conf.avail/10-autohint.conf: Enable autohinter
- /usr/share/fontconfig/conf.avail/10-hinting-full.conf: Set hintfull to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-medium.conf: Set hintmedium to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-none.conf: Set hintnone to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-slight.conf: Set hintslight to hintstyle
- /usr/share/fontconfig/conf.avail/10-no-antialias.conf: Disable antialiasing
- /usr/share/fontconfig/conf.avail/10-scale-bitmap-fonts.conf: Bitmap scaling
[...]
- /usr/share/fontconfig/conf.avail/90-synthetic.conf: No description
```
```
$ FONTCONFIG_FILE=$HOME/does-not-exist fc-conflist
Fontconfig error: Cannot load default config file: No such file: (null)
+ /etc/fonts/conf.d/10-hinting-slight.conf: Set hintslight to hintstyle
+ /etc/fonts/conf.d/10-scale-bitmap-fonts.conf: Bitmap scaling
+ /etc/fonts/conf.d/10-sub-pixel-none.conf: Disable sub-pixel rendering
+ /etc/fonts/conf.d/10-yes-antialias.conf: Enable antialiasing
+ /etc/fonts/conf.d/11-lcdfilter-default.conf: Use lcddefault as default for LCD filter
+ /etc/fonts/conf.d/20-unhint-small-vera.conf: Disable hinting for Bitstream Vera fonts when the size is less than 8ppem
+ /etc/fonts/conf.d/30-liberation-mono.conf: No description
+ /etc/fonts/conf.d/30-liberation-sans-narrow.conf: No description
+ /etc/fonts/conf.d/30-liberation-sans.conf: No description
+ /etc/fonts/conf.d/30-liberation-serif.conf: No description
[...]
+ /etc/fonts/conf.d/90-tt-dejavu.conf: No description
+ memory: No description
```
```
$ export -n FONTCONFIG_FILE
$ fc-conflist
+ /etc/fonts/conf.d/10-hinting-slight.conf: Set hintslight to hintstyle
+ /etc/fonts/conf.d/10-scale-bitmap-fonts.conf: Bitmap scaling
+ /etc/fonts/conf.d/10-sub-pixel-none.conf: Disable sub-pixel rendering
+ /etc/fonts/conf.d/10-yes-antialias.conf: Enable antialiasing
+ /etc/fonts/conf.d/11-lcdfilter-default.conf: Use lcddefault as default for LCD filter
+ /etc/fonts/conf.d/20-unhint-small-vera.conf: Disable hinting for Bitstream Vera fonts when the size is less than 8ppem
+ /etc/fonts/conf.d/30-liberation-mono.conf: No description
+ /etc/fonts/conf.d/30-liberation-sans-narrow.conf: No description
+ /etc/fonts/conf.d/30-liberation-sans.conf: No description
+ /etc/fonts/conf.d/30-liberation-serif.conf: No description
+ /etc/fonts/conf.d/30-metric-aliases.conf: Set substitutions for similar/metric-compatible families
+ /etc/fonts/conf.d/40-nonlatin.conf: Set substitutions for non-Latin fonts
+ /etc/fonts/conf.d/42-luxi-mono.conf: No description
+ /etc/fonts/conf.d/45-dejavu.conf: No description
+ /etc/fonts/conf.d/45-generic.conf: Set substitutions for emoji/math fonts
+ /etc/fonts/conf.d/45-latin.conf: Set substitutions for Latin fonts
+ /etc/fonts/conf.d/45-liberation-sans-narrow.conf: No description
+ /etc/fonts/conf.d/45-liberation.conf: No description
+ /etc/fonts/conf.d/48-spacing.conf: Add mono to the family when spacing is 100
+ /etc/fonts/conf.d/49-sansserif.conf: Add sans-serif to the family when no generic name
+ /home/mark/.fonts.conf: No description
+ /etc/fonts/conf.d/50-user.conf: Load per-user customization files
+ /etc/fonts/conf.d/51-local.conf: Load local customization file
+ /etc/fonts/conf.d/60-generic.conf: Set preferable fonts for emoji/math fonts
+ /etc/fonts/conf.d/60-latin.conf: Set preferable fonts for Latin
+ /etc/fonts/conf.d/65-fonts-persian.conf: No description
+ /etc/fonts/conf.d/65-nonlatin.conf: Set preferable fonts for non-Latin
+ /etc/fonts/conf.d/69-unifont.conf: No description
+ /etc/fonts/conf.d/80-delicious.conf: No description
+ /etc/fonts/conf.d/90-liberation-sans-narrow.conf: No description
+ /etc/fonts/conf.d/90-liberation.conf: No description
+ /etc/fonts/conf.d/90-synthetic.conf: No description
+ /etc/fonts/conf.d/90-tt-dejavu.conf: No description
+ /etc/fonts/fonts.conf: Default configuration file
- /usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf: Re-define fonts dirs sample
- /usr/share/fontconfig/conf.avail/09-autohint-if-no-hinting.conf: Enable autohinter if font doesn't have any hinting
- /usr/share/fontconfig/conf.avail/10-autohint.conf: Enable autohinter
- /usr/share/fontconfig/conf.avail/10-hinting-full.conf: Set hintfull to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-medium.conf: Set hintmedium to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-none.conf: Set hintnone to hintstyle
- /usr/share/fontconfig/conf.avail/10-no-antialias.conf: Disable antialiasing
- /usr/share/fontconfig/conf.avail/10-sub-pixel-bgr.conf: Enable sub-pixel rendering with the BGR stripes layout
- /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf: Enable sub-pixel rendering with the RGB stripes layout
- /usr/share/fontconfig/conf.avail/10-sub-pixel-vbgr.conf: Enable sub-pixel rendering with the vertical BGR stripes layout
- /usr/share/fontconfig/conf.avail/10-sub-pixel-vrgb.conf: Enable sub-pixel rendering with the vertical RGB stripes layout
- /usr/share/fontconfig/conf.avail/10-unhinted.conf: Disable hinting
- /usr/share/fontconfig/conf.avail/11-lcdfilter-legacy.conf: Use lcdlegacy as default for LCD filter
- /usr/share/fontconfig/conf.avail/11-lcdfilter-light.conf: Use lcdlight as default for LCD filter
- /usr/share/fontconfig/conf.avail/25-unhint-nonlatin.conf: Disable hinting for CJK fonts
- /usr/share/fontconfig/conf.avail/35-lang-normalize.conf: No description
- /usr/share/fontconfig/conf.avail/65-khmer.conf: No description
- /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf: Reject bitmap fonts
- /usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf: Accept bitmap fonts
```https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/225Please add a FONTCONFIG_CONFDIR environment variable pointing to a directory ...2023-06-19T12:23:23ZNicolas MailhotPlease add a FONTCONFIG_CONFDIR environment variable pointing to a directory of conf filesRight now fontconfig provides no mean to point its utilities to a directory of additional config files.
That mean that font packages, that include fonts with broken naming, will get this broken naming registered in their appstream and r...Right now fontconfig provides no mean to point its utilities to a directory of additional config files.
That mean that font packages, that include fonts with broken naming, will get this broken naming registered in their appstream and rpm provides, even when they include a fontconfig ruleset that fixes the problem.
For example a font like Raleway, that registers its version in the upstream family name, ends up with
`Provides: font(raleway-v4020)` even though what the user will get once the package is installed is `font(raleway)` (thanks to a fontconfig fixup)
Please add a FONTCONFIG_CONFDIR environment variable that points fontconfig to a directory containing additional conf files (if you’re ambitious you can make it a FONTCONFIG_CONFPATh to allow declaring multiple directories)
At rpm build time (to take one packaging tech) the fontconfig conf files provided by the package itself exist in:
`%{buildroot}%{_datadir}/fontconfig/conf.avail` and nowhere elsehttps://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/363Improve documentation of `acceptfont` and `rejectfont`2023-06-12T13:34:26ZWerner LembergImprove documentation of `acceptfont` and `rejectfont`The documentation should mention that `<acceptfont>` and `<rejectfont>` are only influenced by `<match target="scan">` and not by the targets `"font"` and `"pattern"`, together with an explanation why this is so.The documentation should mention that `<acceptfont>` and `<rejectfont>` are only influenced by `<match target="scan">` and not by the targets `"font"` and `"pattern"`, together with an explanation why this is so.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/365'scalable' vs. 'outline'2023-06-12T10:57:00ZWerner Lemberg'scalable' vs. 'outline'Please document what exactly the properties 'scalable' and 'outline' mean. IMHO it is *not* obvious what they actually do. For example, most users are probably surprised that color bitmap fonts, contrary to B/W bitmap fonts, have the '...Please document what exactly the properties 'scalable' and 'outline' mean. IMHO it is *not* obvious what they actually do. For example, most users are probably surprised that color bitmap fonts, contrary to B/W bitmap fonts, have the 'scalable' property set.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/366How to decode SVG fonts in fontconfig?2023-06-12T02:09:46ZJamaika1How to decode SVG fonts in fontconfig?I've created an ffmpeg decoder with librsvg but I can't figure out how to decode fonts in win64.
I have a strange message.
```
Fontconfig error: Cannot load default config file: No such file: (null)
Input #0, svg_pipe, from 'gvariant-byt...I've created an ffmpeg decoder with librsvg but I can't figure out how to decode fonts in win64.
I have a strange message.
```
Fontconfig error: Cannot load default config file: No such file: (null)
Input #0, svg_pipe, from 'gvariant-byte-boundaries.svg':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: svg, bgra, 154x51, 25 fps, 25 tbr, 25 tbn
1304.76 M-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
```https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/364Typo in FcCharSet docs2023-06-08T15:15:43ZJeffrey BrownTypo in FcCharSet docsIn [`doc/fccharset.fncs#L58`](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/doc/fccharset.fncs#L58), the line reads "Add a character to a charset", but since the function is `FcCharSetDelChar`, it should be "Remove a c...In [`doc/fccharset.fncs#L58`](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/doc/fccharset.fncs#L58), the line reads "Add a character to a charset", but since the function is `FcCharSetDelChar`, it should be "Remove a character from a charset".
Unfortunately I am not able to fork the project and contribute the fix, because I get "personal project creation is not allowed".Akira TAGOHAkira TAGOHhttps://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/362Add `namedinstance` property2023-05-29T13:17:09ZWerner LembergAdd `namedinstance` propertyIn Fontconfig, OpenType Variation Fonts are supported in two different 'modes': Either as 'real' variable fonts with the `variable` property set to 'true', or as named instances (all Variation Fonts provide at least one named instance), ...In Fontconfig, OpenType Variation Fonts are supported in two different 'modes': Either as 'real' variable fonts with the `variable` property set to 'true', or as named instances (all Variation Fonts provide at least one named instance), which can be identified as having an `index` property value larger than 0xFFFF but the `variable` property set to 'false'.
While it is possible to reject Variation Fonts based on the `variable` property, there are difficulties to do the same for named instances: Because `<rejectfont>` and `<acceptfont>` only react to `<match target="scan">` it is not possible to reject (or accept) named instances in application-provided Fontconfig configuration files, where recreating the cache every time the program gets called is not an option.
To solve this I suggest to add a `namedinstance` property for named instances. It would then be possible to write
```xml
<selectfont>
<rejectfont>
<pattern>
<patelt name="variable"><bool>true</bool></patelt>
</pattern>
</rejectfont>
<rejectfont>
<pattern>
<patelt name="namedinstance"><bool>true</bool></patelt>
</pattern>
</rejectfont>
</selectfont>
```https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/361FcFontSetList: free without FcPatternDestroy2023-05-24T03:01:37ZZiggyFcFontSetList: free without FcPatternDestroyIt seems there is a call to `free (bucket)` without a prior `FcPatternDestroy (bucket->pattern)` in [fclist.c#L570](src/fclist.c#L570)
This obviously results with some memleak.It seems there is a call to `free (bucket)` without a prior `FcPatternDestroy (bucket->pattern)` in [fclist.c#L570](src/fclist.c#L570)
This obviously results with some memleak.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/360'variable' font property missing in user documentation2023-05-17T05:35:27ZWerner Lemberg'variable' font property missing in user documentationWhile the 'variable' property is mentioned in the [developer documentation](https://www.freedesktop.org/software/fontconfig/fontconfig-devel/x19.html), it is missing in the [user documentation](https://www.freedesktop.org/software/fontco...While the 'variable' property is mentioned in the [developer documentation](https://www.freedesktop.org/software/fontconfig/fontconfig-devel/x19.html), it is missing in the [user documentation](https://www.freedesktop.org/software/fontconfig/fontconfig-user.html).https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/155`fc-match monospace:lang=en-us` returns Chinese fonts instead of English fonts2023-04-25T13:31:48ZGuo Yunhe`fc-match monospace:lang=en-us` returns Chinese fonts instead of English fontsI have installed Noto CJK fonts.
When I match en monospace fonts:
```
> fc-match monospace:lang=en
SourceCodePro-Regular.otf: "Source Code Pro" "Regular"
```
When I match en-us monospace fonts:
```
> fc-match monospace:lang=en-us
Not...I have installed Noto CJK fonts.
When I match en monospace fonts:
```
> fc-match monospace:lang=en
SourceCodePro-Regular.otf: "Source Code Pro" "Regular"
```
When I match en-us monospace fonts:
```
> fc-match monospace:lang=en-us
NotoSansSC-Regular.otf: "Noto Sans SC" "Regular"
```
The same behavior can be observed in Firefox. If the page has:
```html
<html lang="en">
...
<pre>Some monospace text</pre>
```
It works.
However, if the page has:
```html
<html lang="en-US">
...
<pre>Some monospace text</pre>
```
It will not render monospace text.Akira TAGOHAkira TAGOHhttps://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/358why pattern syntax is different on fc-list with other fontconfig command like...2023-04-24T04:51:47ZYang Hongwhy pattern syntax is different on fc-list with other fontconfig command like fc-matchI just find the syntax of pattern in fc-list is different with other fontconfig command like fc-match and fc-pattern. For fc-list, I have to add ":" in order to list all sans font
```
hongy19@WSL ~$ fc-list sans
hongy19@WSL ~$ fc-list :...I just find the syntax of pattern in fc-list is different with other fontconfig command like fc-match and fc-pattern. For fc-list, I have to add ":" in order to list all sans font
```
hongy19@WSL ~$ fc-list sans
hongy19@WSL ~$ fc-list :sans|head -2
/home/hongy19/.local/share/fonts/opentype/public/almfixed/almfixed.otf: ALM Fixed:style=Regular
/home/hongy19/.local/share/fonts/opentype/public/garamond-math/Garamond-Math.otf: Garamond\-Math:style=Regular
```
but in fc-match and fc-pattern, ":" is not needed
```
hongy19@WSL ~$ fc-pattern :sans
Pattern has 0 elts (size 0)
(null):
hongy19@WSL ~$ fc-pattern sans
Pattern has 1 elts (size 16)
family: "sans"(s)
```https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/3562.14.2 decreased letter spacing interval2023-03-24T09:00:04ZAlex Efros2.14.2 decreased letter spacing intervalUpgrade from 2.14.0 to 2.14.2 result in noticeable decrease of letter spacing interval, at least in urxvt.
I'm using monospace D2Coding font patched with Nerd icons. In urxvt this fontconfig upgrade result in increase of $COLUMNS from 10...Upgrade from 2.14.0 to 2.14.2 result in noticeable decrease of letter spacing interval, at least in urxvt.
I'm using monospace D2Coding font patched with Nerd icons. In urxvt this fontconfig upgrade result in increase of $COLUMNS from 100 to 106 for same urxvt window size just because of decreased letter spacing.
To me text became harder to read because of this change.
I'm not sure is this a fontconfig feature/bug/misconfiguration or a font issue.
Let me know if you'll need more information/screenshots/etc.https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/357macOS 12.5, fontconfig 2.14.2 Cannot read fonts in /System/Library/AssetsV2/c...2023-03-24T08:51:58ZJiaJun MaomacOS 12.5, fontconfig 2.14.2 Cannot read fonts in /System/Library/AssetsV2/com_apple_MobileAsset_Font7In my system(macOS 12.5), there are some fonts in ```/System/Library/AssetsV2/com_apple_MobileAsset_Font7```, but ```fc-list``` cat not read the fonts in this folder, and ```fc-cache``` search fonts in ```/System/Library/AssetsV2/com_app...In my system(macOS 12.5), there are some fonts in ```/System/Library/AssetsV2/com_apple_MobileAsset_Font7```, but ```fc-list``` cat not read the fonts in this folder, and ```fc-cache``` search fonts in ```/System/Library/AssetsV2/com_apple_MobileAsset_Font6```, not ```/System/Library/AssetsV2/com_apple_MobileAsset_Font7```.
So how to use ```fc-list``` to read the fonts in ```/System/Library/AssetsV2/com_apple_MobileAsset_Font7```? or how to fix this problem?
**Enviroments:**
1. macOS 12.5 (21G72)
1. fontconfig version 2.14.2
**Commands:**
```
~ ❯ cd /System/Library/AssetsV2/com_apple_MobileAsset_Font6
/System/Library/AssetsV2/com_apple_MobileAsset_Font6 ❯ fc-cache --version
fontconfig version 2.14.2
/System/Library/AssetsV2/com_apple_MobileAsset_Font6 ❯ ls
com_apple_MobileAsset_Font6.xml
/System/Library/AssetsV2/com_apple_MobileAsset_Font6 ❯ cd ../com_apple_MobileAsset_Font7
/System/Library/AssetsV2/com_apple_MobileAsset_Font7 ❯ ls
0261f7b61f7cf2a9561694fc996a1e2ab9b517bb.asset 3a9dbc8ddc8b85f43055a28fb5d551e905d43de2.asset 7ca27bc02dd7660f9dacd69df96d24639b96e080.asset ad8c3bb76851adc11dc4772c1a7a00caf83e3037.asset e2c331b942cb338404a160a97a7cd6e8a31428e8.asset
0818d874bf1d0e24a1fe62e79f407717792c5ee1.asset 3d7c99b85a518ffb479044c11185e47744b6448d.asset 7eb2afb6cbdb982371bb615d532a887629d99bf4.asset b86e58f38fd21e9782e70a104676f1655e72ebab.asset e9a9a2d18358033875835a6228cb70ce84b7e47c.asset
0ab217c39c45c7c6acaddfa199fd32c55a7b4a19.asset 40e56e4eafd8b4db78ffe316f64ac4bedba37b53.asset 857d6c90171c328a4892c1492291d34e401d7f25.asset b8cf53b3591d6062cd536ba5129454cba899a078.asset eb257c12d1a51c8c661b89f30eec56cacf9b8987.asset
0c723883d13f8442faf3adb131fc1eb91c7a1bf1.asset 42062e40d643fdb5bb3fba917212352fb0690de0.asset 8739f5cf483d3b2f04cbb451d310b68f0cf880d0.asset ba5946173475eb777df1e152b131838137ff080d.asset f0059ebd0704e246a1971c4892c45f38ad053413.asset
10b097deccb3c6126d986e24b1980031ff7399da.asset 54a2ad3dac6cac875ad675d7d273dc425010a877.asset 8dc7805506cc9f233dcc19aabf593196842a47ae.asset bad9b4bf17cf1669dde54184ba4431c22dcad27b.asset f0706a236683628e16427c6569e441423faaaa93.asset
18189590ed3a5f46cef20ed4d1cec2611dca13ff.asset 54ef167d6c8e99a69a0d41ce252cc5995ba47580.asset 938fc4f0524ec9f143f1b39a4e63ff9585298376.asset be500dfb81109622b25552bf40ef83b767d2683c.asset f110a45f1759f86c645cfd2f47baba57aa50056e.asset
1821952872c81043711aab6910052b65da8edf2c.asset 5a3fc034b64879656271c040cab38b65d4ea6548.asset 96af7ec9e88d5dae450d3162213f92a7b1129430.asset c2cf5e684236b5395fd48d6ccf0e3b3191ce83a0.asset f7b33b6b63ac62df4a15ffb507b52db565b1091c.asset
2371acc1476f56b565e773159763b5dc3b3d6a1e.asset 5b843781be7f58151ada774942a0eaa9ec79bd57.asset 9d5450ee93f17da1eacfa01b5e7b598f9e2dda2b.asset com_apple_MobileAsset_Font7.xml f7f6b250e97c182e68ac53a2b359ec44548878b9.asset
2826c5ed6c617f49732314cb85e71d4d131c2b4f.asset 62032b9b64a0e3a9121c50aeb2ed794e3e2c201f.asset 9fdda46cbe802833590494a09b2787378340c597.asset d9a8a6ae726910080d90232eaf0edb06da712758.asset f879347736afb6e4e0880bcede9df92492c0f040.asset
28f00a24ba19995bab7249993e6e35d11011074a.asset 6f4c91728bb824d6960725ec479c355eab7eeba8.asset a3f9a9e35bdf3babe03b2fd162051306fad439d6.asset de4b2bad515a67ab2d11e39fd896b1e189252a43.asset
2ae839cbaa0ff60fe6a1d8921a77c81adcec0646.asset 70816a43827731d40efe234b94feba96db91024f.asset a8805b853edf89283dec908153a0015bdd1d00f8.asset de97612eef4e3cf8ee8e5c0ebd6fd879bbecd23a.asset
32d11e548996658757774d88f9220993653017ea.asset 7278ac2566252649b05c5a2b07c7d45be59f47c5.asset aa99d0b2bad7f797f38b49d46cde28fd4b58876e.asset e28431125242b9a298de3296370abdab4a7e8666.asset
/System/Library/AssetsV2/com_apple_MobileAsset_Font7 ❯ fc-cache -frv
Font directories:
/System/Library/Fonts
/Library/Fonts
/Users/maojj/Library/Fonts
/System/Library/AssetsV2/com_apple_MobileAsset_Font6
/Users/maojj/.local/share/fonts
/usr/local/share/fonts
/usr/share/fonts
/Users/maojj/.fonts
/Users/maojj/Library/Application Support/HellFont/CoreSync/plugins/livetype/.r
/System/Library/Fonts/Supplemental
/System/Library/Fonts: caching, new cache contents: 872 fonts, 1 dirs
/System/Library/Fonts/Supplemental: caching, new cache contents: 482 fonts, 0 dirs
/Library/Fonts: caching, new cache contents: 122 fonts, 0 dirs
/Users/maojj/Library/Fonts: caching, new cache contents: 168 fonts, 0 dirs
/System/Library/AssetsV2/com_apple_MobileAsset_Font6: caching, new cache contents: 0 fonts, 0 dirs
/Users/maojj/.local/share/fonts: skipping, no such directory
/usr/local/share/fonts: skipping, no such directory
/usr/share/fonts: skipping, no such directory
/Users/maojj/.fonts: skipping, no such directory
/Users/maojj/Library/Application Support/HellFont/CoreSync/plugins/livetype/.r: skipping, no such directory
/System/Library/Fonts/Supplemental: skipping, looped directory detected
/opt/homebrew/var/cache/fontconfig: not cleaning unwritable cache directory
/Users/maojj/.cache/fontconfig: cleaning cache directory
/Users/maojj/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded
```https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/353Include some more CJK fonts in stock config files2023-03-14T06:01:43ZRidley CombsInclude some more CJK fonts in stock config filesOn my macOS system, the default `sans-serif` font for CJK glyphs in `zh-HK` seems to be `HannotateTC`, which is fairly stylistic and not well-suited for use as a default font: ![image](/uploads/46f859e1ff565385b50662c9038146a8/image.png)...On my macOS system, the default `sans-serif` font for CJK glyphs in `zh-HK` seems to be `HannotateTC`, which is fairly stylistic and not well-suited for use as a default font: ![image](/uploads/46f859e1ff565385b50662c9038146a8/image.png)
This seems to be because there is no Hong Kong Chinese font in the macOS preinstalled set listed in fontconfig's stock config files, so fontconfig is simply falling back on the first font it finds (alphabetically?).
I'd suggest resolving this by adding some entries to the `65-nonlatin.conf` file:
For the `sans-serif` list:
- `PingFang SC`, `PingFang TC`, `PingFang HK` (default sans-serif Chinese fonts on macOS)
- `Hiragino Sans` (default sans-serif Japanese font on macOS)
- `Apple SD Gothic Neo` (default sans-serif Korean font on macOS)
And possibly also:
- `Hiragino Sans GB`, `Hiragino Sans CNS` (macOS-provided sans-serif simplified and traditional Chinese fonts)
For the `serif` list:
- `Songti SC`, `Songti TC` (default serif Chinese fonts on macOS)
- `Hiragino Mincho ProN` (default serif Japanese font on macOS)
- `AppleMyungjo` (default serif Korean font on macOS)
And possibly also:
- `SimSong` (macOS-provided serif simplified Chinese font)
It may also be helpful to include config data for Noto CJK, similar to the one [shipped by Arch](https://github.com/archlinux/svntogit-packages/blob/packages/noto-fonts-cjk/trunk/70-noto-cjk.conf) (though note that theirs mistakenly maps `serif` with `zh-HK` to `Noto Serif CJK TC`; it should be `Noto Serif CJK HK`). Noto fonts are already supported in other languages, and Noto CJK is now a very common group of free CJK fonts.