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

Issue 713529 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Consider using FreeType for CFF2 support on all platforms

Project Member Reported by drott@chromium.org, Apr 20 2017

Issue description

Now that we have FreeType on Windows, we could consider adding a font type distinction and routing CFF2 fonts through FreeType on Windows as well. 

 

Comment 1 by drott@chromium.org, Apr 20 2017

Cc: sascha@google.com

Comment 2 by ebra...@gnu.org, May 9 2017

Cc: ebra...@gnu.org

Comment 3 by drott@chromium.org, Oct 13 2017

Cc: drott@chromium.org
 Issue 774434  has been merged into this issue.

Comment 4 by drott@chromium.org, Oct 13 2017

Status: Started (was: Assigned)
Project Member

Comment 5 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 6 by ebra...@gnu.org, Feb 22 2018

Status: Fixed (was: Started)

Comment 7 by e...@chromium.org, Feb 22 2018

\o/

Sign in to add a comment