See the companion CL ( If78de54572a48551da0ab2fd5027ca8389d21988 )
for more details .
Bug: 74406309
Test: m fontchain_linter
Test: See If78de54572a48551da0ab2fd5027ca8389d21988 .
Change-Id: Ib3c827a32028af8fa6fe84203c7983ab45f65853
Keep fontchain_lint from rerunning on every make checkbuild by
making it touch an output file and giving it dependencies on
anything that should cause it to rerun.
Bug: 27727331
Test: m checkbuild
Change-Id: I0d8a41b308cac04844e27beb51c12dbf46cb1a4a
Minikin already supports multiple languages specified per font in
I7f13b51464c9b01982bb573251d77052b9ddbd70. This CL adds a couple of
such cases into fonts.xml and clarifies in the method and the
variable names and parameters that the frameworks is handling a
multi-language string when it is.
Fixes: 26687969
Test: make -j checkbuild
Test: bit FrameworksCoreTests:android.graphics.TypefaceSystemFallbackTest
Change-Id: Ifa540a95f87921983f9069330d1dd0892538a8df
Various Jamo characters were off-by-one, missing from the cmap table,
or incorrect.
Change-Id: Iaae427f1b3973b1a08629b6dceec0e805a9352aa
Fixes: 64481267
Test: compared TTF files by looking at their TTX dump
Previously, we used PRODUCT_COPY_FILES. However, that does not allow
overriding the file to use a different one on a per-device basis.
This change migrates the logic to using a BUILD_PREBUILT module
called fonts.xml.
To add additional fonts, the add_additional_fonts.py script has been
added. If ADDITIONAL_FONTS_FILE is defined, add_additional_fonts.py
is run and generates a new version of fonts.xml that contains the
content of ADDITIONAL_FONTS_FILE added where
"<!-- fallback fonts -->" is added.
Bug: 36855735
Bug: 37997769
Test: manual. built multiple devices and verified that the correct
versions of fonts.xml were showing.
Change-Id: I8308f0cb3068274bca5ebd25a38cc023babbd69d
There are shared East Asian punctuation defined in the Phags-pa and
Yi fonts, which would override the default Chinese form which we
prefer. This CL moves them to the end of the fallback chain, similar
to Ic2cbc79cecf9539ace8a432f373685eeff81e106.
Test: manual
Change-Id: Ieeb4c04ca785e07a5db94006a6da31ad040b7e7a
Bug: 38182099
This CL cleans up APIs around font variation settings.
- Remove FontConfig and FontManager public API.
- Remove FontManagerService from system service.
- Extract inner class FontConfig.Axis as top-level class FontVariationAxis.
This is used by Typeface.Builder public API to create new Typeface.
- Introduce and expose FontVariationAxis utility functions from/to string.
- Throws if the invalid font variation settings is passed.
Test: android.text.cts.FontVariationAxisTest passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.cts.PaintTest passes
Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
Update fonts.xml to use NotoSansKhmer-VF.ttf.
The weight range of Khmer is also extended to have 9 weight instances
(three more than Roboto with 200, 600 and 800).
The width range for Khmer is left alone partly because of an apparent
lack of support in fonts.xml for non-normal width fallback fonts.
Note that Noto Sans Khmer UI is left alone because of a baseline issue.
BUG: 22667753
Test: See the QA instruction in comment 10 of the bug.
Test: fontchain_lint
Change-Id: Idf6d4fec86822663ac08feb8979edacbc6c709a0
Fonts for Avestan, Brahmi, Carian, Cuneiform, Cypriot, Deseret,
Egyptian Hieroglyphs, Gothic, Imperial Aramaic, Inscriptional
Pahlavi, Inscriptional Parthian, Kaithi, Kharoshthi, Linear B,
Lycian, Lydian, Ogham, Old Italic, Old Persian, Old South Arabian,
Old Turkic, Osmanya, Phoenician, Shavian, and Ugaritic have been
added to fonts.xml.
Test: Manual
Bug: 32046261
Change-Id: I3e8a0cc5b066d88f0655daf99320a992037d9082
Font data for Phags-pa, Runic, Samaritan, and Tagalog are added, as
well as two new styles for Syriac (Estrangela was already included,
Eastern and Western are added).
Bug: 29535549
Bug: 32046261
Test: manual (new characters are now displayed) and 'make fontchain_lint'
Change-Id: Iad08286392850caf92e374818bd29d06b6a87e52
Droid Sans Fallback is now completely replaced by Noto Sans CJK. The
font files are kept in the tree, since the SDK still needs them.
Also, Android.mk is updated to reflect the fact that Noto Color Emoji
is now included in SMALLER_FONT_FOOTPRINT, so fontchain_lint checks
for emoji consistency in that footprint too.
Bug: 31854008
Test: make fontchain_lint
Change-Id: I4f57114a48ecfaee87b49f01f7ef4fa5cd0b19fb
If the language tag "und-Zsym" is applied to a TextView, the default
presentation should be text-style. However, it didn't work before this
patch, due to a lack of "und-Zsym" language tag in fonts.xml.
Bug: 31297127
Change-Id: Ieed8fe1532806dd1e75c58aa0d7a724bfeed7796
fontchain_lint scans directories in $(TARGET_OUT). There is no better
target working as dependency than the system.img.
Change-Id: I560b89f697e5ebd4f1e44a150f5af37996cf427e
This re-enables the emoji font tests, but doesn't run the tests if
SMALLER_FONT_FOOTPRINT is set.
Additionally, we test that there's one and only one emoji font in the
fallback chain.
Bug: 26187231
Bug: 27785690
Change-Id: I2e6d467e3f54ee3d41737170d7c2492a0f6b30f0
1. Check that all emoji characters are supported in emoji fonts.
2. Check that no default-emoji characters are included in any font
that can get a higher score then the color emoji font, either by
being before it or by having a language/script assigned.
Bug: 26187231
Change-Id: Ic76bf59f1c6f9d2d290b1b64128d725ae08dcb5c
Various tests have been added:
1. Availability of hyphens: Make sure that every font used for
rendering a language that is automatically hyphenated includes either
of Unicode hyphen characters U+2010 HYPHEN or U+002D HYPHEN-MINUS.
2. Range of values: Make sure that styles, weights, and styles belong
to certain limited sets.
Bug: 26187231
Bug: 21570828
Bug: 21815394
Change-Id: Ia63d63cc8da4f2d6bc81fe5619ccac6cfcd9a54e
Add various ISO 15924 codes to fonts.xml, as a signal for better
font selection in Minikin.
Bug: 27582800
Bug: 26187231
Change-Id: Ie06c156e0179e79c15cf2d66d577c3d36571860d
The font was mistakenly removed in
Ib69e73a6682d7eedd7b824f1dadc79cbccf07605, while it is still built
for SMALLER_FONT_FOOTPRINT devices.
Change-Id: Icb62ef6ef7445255191c70110a2b5eb4105628ce
These two fonts are no longer installed on a device.
This leaves the fonts themselves in place for the sdk build.
Change-Id: Ib69e73a6682d7eedd7b824f1dadc79cbccf07605
There are two reasons for this. First, the name 'ttcIndex' is over
specific, there are many indexed font containers in addition to ttc,
such as fon, pfr, bdf, and dfont. There may be others in the future.
Second, Skia implemented this attribute with the name 'index' quite
some time ago. By naming this attribute 'index' even existing apps will
be able to use this attribute (including Chrome).
BUG: 10861108
Change-Id: I68d2b69fad304d93313f96bf3365af71906dfe69
This is needed by Minikin to choose the best font when text and emoji
variation selectors are used.
BUG=11256006
Change-Id: I5774fdf0190dcc42ec827ef5dcec8cdbd28ee925
They were no longer in use by frameworks. They were never part of a
public API and were kept in the system just in case a legacy app read
them. They had also been deprecated for three releases, which should
have given everybody enough time to switch.
Bug: 21785593
Change-Id: Ib80bcea92e45b608388455ef576bbfde647f77db
This is a temporary font profile to get razor and razorg (Nexus 7,
2013 version). It's not tested thoroughly, and should not be used for
any other devices.
The CONSTRAINED profile removes Bamum, Lisu, Mandaic, Mongolian, New
Tai Lue, Syriac, Tibetan, and Vai fonts from razor[g] devices, and
switches the CJK fonts to the limited pre-Lollipop fonts.
Bug: 22929087
Change-Id: I58c1693ee45e54b429013029d236617834446811
Previously, the inconsistency resulted in test in the testUniformY in
frameworks/base/graphics/tests/graphicstests/src/android/graphics/TypefaceTest.java
fail. The tests assume the different sans/serif/mono styles share a
consistent ascent and descent.
The font is modified using the following Python script:
from fontTools import ttLib
font_file = 'DroidSansMono.ttf'
font = ttLib.TTFont(font_file)
font['hhea'].ascent = 1900
font['hhea'].descent = -500
font.save('touched/'+font_file)
Bug: 19791102
Change-Id: I2fcd44b952691deeeed18f30d06bc9f6d5e4a8de
This is now possible since we have less space restrictions on
devices.
This helps make sure that devices don't mistakenly ship with a
limited font support simply because they didn't turn on the extended
font profile.
Although the larger version of Droid Sans Fallback is no longer used
in any font profile for a device, it is kept since it's used by the
SDK.
The Nanum Gothic font is no longer used in any device profile either,
but it's kept in the fallback chain, so the SDK (that uses it)
continues to work.
Bug: 19668057
Change-Id: I6e32c4c98745e9b6aff6684d993943a19aebf6f7
This makes sure that symbol characters who have both an alternative
or "full-width" version in the CJK fonts and a more regular version
in the symbols font get the default or "half-width" version by
default in non-CJK locales.
This is not a complete fix: such "full-width" symbol characters only
exist in the Simplfied Chinese font for now, which means in
Traditional Chinese, Japanese, and Korean locales, they characters
would now appear "half-width", which *may* be sub-optimal. The
complete fix would make sure the ones that actually need to be
"full-width" in TC/J/K are also included in the TC/J/K font.
Bug: 21525318
Bug: 21525012
Bug: 21524421
Bug: 21521330
Bug: 21520316
Bug: 21518544
Bug: 21517912
Bug: 21503807
Bug: 21502245
Bug: 21501669
Bug: 21525905
Bug: 21524018
Bug: 21503952
Bug: 21502678
Change-Id: I93cf7119b45ed3c080cd39d631a687e0ef9fd8ce
The latest files from the upstream Noto repository are named
NotoNaskhArabic* instead of the previous NotoNaskh*.
Also, Noto Sans Tibetan is now included in the fallback chain. Apart
from supporting Tibetan and Dzongkha langauges, this adds a character
(U+0FD6) that completes coverage for ARIB character sets.
Bug: 13680438
Bug: 18181755
Bug: 18639453
Bug: 19390244
Change-Id: I09b493340d1453ef61b08c841e1731119d645822
This clarifies the meaning of the variable, that this switch only
affects the Noto Sans Japanese font.
Change-Id: I28043ed41ec51af0273a071692426d51352ef849
Noto fonts for Bamum, Lisu (Fraser), Mandaic, Mongolian, New Tai Lue,
Syriac (Estrangela), and Vai scripts are added to the fallback chain.
Bug: 19390244
Bug: 18639453
Change-Id: If18a7ea245f3b15baa9fb4f53855ae64759f921b