[Bug 1556457] Re: [FFe] Demilight (OS/2 weight=350) confuses fontconfig

Mingye Wang arthur2e5 at aosc.xyz
Mon Apr 4 12:19:07 UTC 2016


> Is there some way to iterate over the unicode glyphs for fonts that we
have available, to ensure that the new fontconfig does not crash on
those?

fc-match doesn't seem to provide glyph-level lists, but anyway
`diff`-ing over some fallback order dump should help:

#!/bin/bash
FC_MATCH=/usr/bin/fc-match
# use dictionary keys as a string-set
declare -A locales

# grab a list-of-locales
for i in /var/lib/locales/supported.d/*; do
  mapfile -t arr < "$i"
  # kill the longest trailing [. ]*, so what we got are basically the lang_LOC part
  for l in "${arr[@]%%[. ]*}"; do
    locales["$l"]='' # make it defined, that's all we need to snap the key in
  done
done

for loc in "${!locales[@]}"; do
  echo "# $loc:"
  export LC_ALL=${loc}.UTF-8
  for font in Sans Serif Monospace Ubuntu; do
    for weight in regular bold; do
      # more inner loops for styles.......
      echo "* $font:weight=$weight:"
      fc-match -a "$font:weight=$weight:"
      echo
    done
  done
  echo
done

> Does this need any other dependencies (freetype etc.)? if 2.11.94
causes trouble, how easily can we go back to 2.11.1?

No.

2.11.94 seems to be 100% ABI and API compatible with 2.11.1.
Archlinux and AOSC OS survived the update, and Fedora has been using 2.11.94 for quite a while.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to fontconfig in Ubuntu.
https://bugs.launchpad.net/bugs/1556457

Title:
  [FFe] Demilight (OS/2 weight=350) confuses fontconfig

Status in Fontconfig:
  Fix Released
Status in fontconfig package in Ubuntu:
  New
Status in fontconfig package in Arch Linux:
  New

Bug description:
  [FFe request comment]

  Upgrading to fontconfig 2.11.94 is proposed as a fix of this bug,
  including a fix of certain font weight issues due to the switch from
  fonts-droid to fonts-noto-cjk for Chinese (discussed at bug #1468027)
  where we haven't found any way to work around the problem.

  The proposed upload is available in this PPA:
  https://launchpad.net/~gunnarhj/+archive/ubuntu/fontconfig-test2

  Changes are listed in the attachment upstream_git-log.txt

  [Original description including updates]

  See https://bugs.freedesktop.org/show_bug.cgi?id=81453 and bug
  1468027.

  Fontconfig lacks support for many OpenType/TrueType OS/2 font weight
  values. This causes a bunch of problems, like mixing up Demilight
  (weight=350) and Regular (weight=400).

  Although it's possible to write (dirty?) hacks for deb-packed fonts,
  this still causes problems for otherwise sourced fonts.

  Archlinux: https://bugs.archlinux.org/task/48550 (fix released,
  upgraded to 2.11.94)

To manage notifications about this bug go to:
https://bugs.launchpad.net/fontconfig/+bug/1556457/+subscriptions



More information about the foundations-bugs mailing list