New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 758209 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue skia:7159
issue skia:7632

Blocking:
issue 703332



Sign in to add a comment

Cross platform CBDT/CBLT support through FreeType

Project Member Reported by drott@chromium.org, Aug 23 2017

Issue description

Now [1] that we have support for FreeType on Windows and Mac, we can run CBDT/CBLC fonts through FreeType on platforms where we can't easily render them through the system font stack, for example older Windows and Mac in general.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=700926#c18

This requires refactoring font instantiation between WebFontDecoder and FontCustomPlatformData. 

I experimentally instantiated all web fonts on Mac through FreeType, and this exposes some metrics issue for emoji that we need to sort out. 


 

Comment 1 by drott@chromium.org, Aug 23 2017

Blocking: 703332

Comment 2 by drott@chromium.org, Aug 23 2017

Cc: ebra...@gnu.org

Comment 3 by drott@chromium.org, Aug 23 2017

Cc: behdad@chromium.org

Comment 4 by behdad@chromium.org, Aug 26 2017

Note that FreeType also supports sbix.  So sbix on non-Apple platforms can go through this path as well.

Comment 5 by drott@chromium.org, Nov 7 2017

Blockedon: skia:7159

Comment 6 by js...@chromium.org, Nov 27 2017

Cc: js...@chromium.org

Comment 7 by drott@chromium.org, Feb 14 2018

I filed https://savannah.nongnu.org/bugs/index.php?53154 and we need something like the patch in that issue, we should ignore `glyf` table outlines in fonts that have CBDT/CBLC in order to pass pixelambacht.nl/chromacheck (which uses a glyf table in the font).

Comment 8 by drott@chromium.org, Feb 14 2018

Sbix is  issue 605334 .

Comment 9 by drott@chromium.org, Feb 15 2018

Blockedon: skia:7632
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7cd32864f21b540832c3297c68d9473f465e6341

commit 7cd32864f21b540832c3297c68d9473f465e6341
Author: Dominik Röttsches <drott@chromium.org>
Date: Thu Feb 22 16:59:28 2018

Cross platform support for font formats sbix, CBDT/CBLC, CFF2

Chrome previously supported CBDT/CBLC on FreeType based platforms:
Android, Linux, ChromeOS. FreeType added support for rasterizing sbix as
well as CFF2 glyph outlines. This CL enables usage of all these formats
on all Chrome platforms. This means with this CL color font formats
sbix, CBDT/CBLC and CFF2 OpenType fonts are supported on all platforms
Chrome supports.

This CL introduces a format dependent font instantiation mechanism which
chooses between FreeType or the system rasterizer backend. This
mechanism first identifies the font format, then chooses the
corresponding Skia Font Manager for SkTypeface instantiation.

The font format is determined by reading the list of table tags using
HarfBuzz API. HarfBuzz API is a lightweight way of accessing the table
tags without performing any additional font loading / instantiation
operations, which we don't need until we know which format the font is.

Thanks to Roel Niskens for pixelambacht.nl/chromacheck/ and the
Chromacheck fonts, which are used in the newly added layout tests. I
contributed a fix to the Chromacheck sbix test font in
https://github.com/RoelN/ChromaCheck/pull/37 in order to fix sbix
testing in Chromium on Mac OS < 10.13.

FreeType got rolled in CL:924152 to include my FreeType patch from
https://savannah.nongnu.org/bugs/?53154 for preferrring bitmap fonts in
CBDT/CBLC fonts.

font-format-support-cbdt-sbix-cff2.html,
font-format-support-cbdt-sbix-cff2-vertical.html test rendering at
different sizes, with transforms applied. Color font rendering is
currently limited to bitmaps of size 256x256 pixels, see issue
skia:6099. inspector-protocol/layout-fonts/cross-platform-cbdt-sbix-cff2.js
tests for correct glyph selection from the color fonts.

Bug:  758209 ,  605334 ,  713529 
Tbr: jshin@chromium.org, bashi@chromium.org
Change-Id: I8bc65aacade46014405330f54c6f5d9ac6b1cc8f
Reviewed-on: https://chromium-review.googlesource.com/706248
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538458}
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/fast/text/font-format-support-cbdt-sbix-cff2-vertical.html
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/fast/text/font-format-support-cbdt-sbix-cff2.html
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/cross-platform-cbdt-sbix-cff2-expected.txt
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/cross-platform-cbdt-sbix-cff2.js
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/linux/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/linux/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/mac/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/mac/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/win/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/win/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/win7/fast/text/font-format-support-cbdt-sbix-cff2-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/platform/win7/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/third_party/AdobeVF/AdobeVFPrototype.otf
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/third_party/AdobeVF/LICENSE.md
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/third_party/AdobeVF/README.chromium
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/third_party/ChromaCheck/LICENSE.md
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/third_party/ChromaCheck/README.chromium
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/third_party/ChromaCheck/chromacheck-cbdt.woff
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/LayoutTests/third_party/ChromaCheck/chromacheck-sbix.woff
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.h
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/WebFontDecoder.cpp
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/WebFontDecoder.h
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/WebFontTypefaceFactory.cpp
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/WebFontTypefaceFactory.h
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/opentype/FontFormatCheck.cpp
[add] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/opentype/FontFormatCheck.h
[delete] https://crrev.com/b25820415f6630e4b57a55e2fd56a6e475961cf0/third_party/WebKit/Source/platform/fonts/opentype/VariableFontCheck.cpp
[delete] https://crrev.com/b25820415f6630e4b57a55e2fd56a6e475961cf0/third_party/WebKit/Source/platform/fonts/opentype/VariableFontCheck.h
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFontCache.h
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/ots/README.chromium
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/third_party/ots/src/ots.cc
[modify] https://crrev.com/7cd32864f21b540832c3297c68d9473f465e6341/tools/metrics/histograms/enums.xml

Comment 11 by ebra...@gnu.org, Feb 22 2018

Status: Fixed (was: Started)

Sign in to add a comment