Add variable fonts to Chrome OS |
||||
Issue descriptionSome Noto fonts are ready to be deployed as variable fonts offering a far wider range of weights and widths than 'regular' and 'bold' with 'continuous' variations along the two axes (or one axis depending on the script). FreeType and HarfBuzz in Chrome OS are updated to support variable fonts. Blink has support for them as well. This will also help material design implementations (that use more weights than 'traditional' regular and bold) in non-Latin-Greek-Cyrillic scripts. When ready, Roboto and Roboto Condendsed also can be replaced with Roboto-VF. To Behdad, does fontconfig need any change for VF? fontconfig on CrOS is currently rather old (2.11.1). The newest is 2.12.4. Well, it has to be updated anyway.
,
Jul 21 2017
Not for system fonts yet, sorry. Currently Blink only passes params to Skia for web font blobs.
,
Jul 21 2017
I will start discussing with Ben and thinking about ways how we could pass variation params to system fonts on CrOS (/Linux if libs are new enough) and mac OS at least.
,
Jul 24 2017
With the newest FontConfig I think the named instances should work (as pointed out in comment #1). I believe this is done with something of a hack between FontConfig and FreeType, where the least significant 16 bits of the font index are used as the font collection index (the way they always have, usually as a ttc index) and the most significant 16 bits are used as the one-based index of the named instance (a zero here indicates use the default, which may or may not be named). This information should get passed around through the font system fine, but note that these indexes will only be useful with FreeType (which should be fine with ChromeOS, but just be aware). Skia has a test[1] to ensure this oddity of font index handling keeps working with FreeType, so things should work. Let us know if they don't. [1] https://skia.googlesource.com/skia/+/2112df028caf651bed28ee3203625b9a57d48333/tests/TypefaceTest.cpp#132
,
Sep 14 2017
Thanks, Ben ! Your comment 4 about fontconfig's font index "overloading" (and interaction with FreeType) is also what Behdad told me. I'll update fontconfig to the latest on CrOS and add Noto variation fonts.
,
Nov 27 2017
For certain scripts, this is blocked by bug 694137 . Noto variable fonts out of the Noto pipelines are not hinted so that automatic hinting is necessary. We can also drop all the Dejavu fonts when we add variable fonts because condensed width will be supported by Noto variable fonts. ( ~ 8MB). DejaVuSans-BoldOblique.ttf DejaVuSans-Oblique.ttf DejaVuSans-Bold.ttf DejaVuSans.ttf DejaVuSansCondensed-BoldOblique.ttf DejaVuSerif-BoldItalic.ttf DejaVuSansCondensed-Bold.ttf DejaVuSerif-Bold.ttf DejaVuSansCondensed-Oblique.ttf DejaVuSerifCondensed-BoldItalic.ttf DejaVuSansCondensed.ttf DejaVuSerifCondensed-Bold.ttf DejaVuSans-ExtraLight.ttf DejaVuSerifCondensed-Italic.ttf DejaVuSansMono-BoldOblique.ttf DejaVuSerifCondensed.ttf DejaVuSansMono-Bold.ttf DejaVuSerif-Italic.ttf DejaVuSansMono-Oblique.ttf DejaVuSerif.ttf DejaVuSansMono.ttf
,
Feb 2 2018
,
May 22 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/7857326822b4b1487a31fd60f0fdc815fdf54c45 commit 7857326822b4b1487a31fd60f0fdc815fdf54c45 Author: Jungshik Shin <jshin@chromium.org> Date: Tue May 22 10:19:19 2018 Prepare for update fontconfig to 2.13.0 Add a copy of unchanged upstream ebuild so that our local changes on top of it can be recorded. It's masked so that we'll keep using fontconfig-2.11 before it's unmasked along with local changes. There are two local changes, nonetheless 1. eapi7-ver eclass is not present so that it's dropped from inherit line. The check for the 3rd component of the version number ( [[ $(ver_cut 3) -ge 90 ]] ) before KEYWORDS is also dropped because it uses ver_cut from eapi7-ver. 2. KEYWORDS is set to '~*' to pass the presubmit check. BUG=chromium:747459 TEST=None (fc 2.13 is masked) Change-Id: I4d5f8ad46e616fa49ed0cf7a2b11f46e8b6e3863 Reviewed-on: https://chromium-review.googlesource.com/1065214 Commit-Ready: Jungshik Shin <jshin@chromium.org> Tested-by: Jungshik Shin <jshin@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [add] https://crrev.com/7857326822b4b1487a31fd60f0fdc815fdf54c45/media-libs/fontconfig/fontconfig-2.13.0-r4.ebuild
,
Jan 8
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/5dc2d92ffbdf38612359901953a86930e85dc3e7 commit 5dc2d92ffbdf38612359901953a86930e85dc3e7 Author: Jungshik Shin <jshin@chromium.org> Date: Tue Jan 08 03:41:03 2019 Drop DejaVu fonts Noto font family covers more than what's covered by DejaVu. We'd not need DejaVu any more. A follow-up to this CL will add Noto variable fonts to support condensed width variants. This frees up 8.9M diskspace, some of which will be reclaimed for variable font support (see crbug.com/747459 ). This reduction also makes up for the size increase (1.2M) due to statically linking HarfBuzza and FreeType to Chromium browser (https://crrev.com/c/1050389 ). Because the dejavu font package is pulled in by virtual/ttf-fonts in portage, it's overriden by a copy in chromiumos-overlay that only depends on chromeos-base/chromeos-fonts. In fontconfig, delete 45-latin and 60-latin that refer to Dejavu fonts and other fonts not installed on Chrome OS. 10-antialiasing is not available any more and anti-aliasing is ON by default so that there's no need to add it. Delete the lines for them in the fontconfig ebuild. BUG= chromium:694137 ,chromium:747459 TEST=No new "tofus" in web pages of rarely used scripts. Change-Id: I92f69ccce43c8120751057ac1ba5a12e5933f2ea Reviewed-on: https://chromium-review.googlesource.com/1048320 Commit-Ready: Jungshik Shin <jshin@chromium.org> Tested-by: Jungshik Shin <jshin@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [add] https://crrev.com/5dc2d92ffbdf38612359901953a86930e85dc3e7/virtual/ttf-fonts/ttf-fonts-1-r1.ebuild [rename] https://crrev.com/5dc2d92ffbdf38612359901953a86930e85dc3e7/chromeos-base/chromeos-fonts/chromeos-fonts-0.0.1-r38.ebuild [rename] https://crrev.com/5dc2d92ffbdf38612359901953a86930e85dc3e7/media-libs/fontconfig/fontconfig-2.13.0-r9.ebuild [modify] https://crrev.com/5dc2d92ffbdf38612359901953a86930e85dc3e7/media-libs/fontconfig/files/local.conf [modify] https://crrev.com/5dc2d92ffbdf38612359901953a86930e85dc3e7/chromeos-base/chromeos-fonts/chromeos-fonts-0.0.1.ebuild
,
Jan 8
CrOS is now ready to take in variable fonts. I thought I need to add special entries for variable font named instances in fontconfig configuration files (e.g. local.conf ), but apparently not. ( https://lists.freedesktop.org/archives/fontconfig/2017-September/006048.html ). I'll experiment by adding one or two variable fonts to CrOS and checking how Blink works.
,
Jan 8
What's not recorded here is a follow-up to the CL in comment 8. : https://chromium-review.googlesource.com/1313968 (for bug 900288 as well as this one). |
||||
►
Sign in to add a comment |
||||
Comment 1 by behdad@chromium.org
, Jul 21 2017