244 Commits

Author SHA1 Message Date
Marek Z Jeziorek
0806acaf0c New priority scripts + critical updates to fonts.
Author: Marek Z. Jeziorek <marekj@google.com>

BUGANIZER BUGS Addressed
========================
BUG: 149257053

CHANGES
=======
Remove font files no longer required
 deleted:    other/NotoSansAdlam-Regular.ttf
 deleted:    other/NotoSansGeorgian-Bold.otf
 deleted:    other/NotoSansGeorgian-Medium.otf
 deleted:    other/NotoSansGeorgian-Regular.otf
 deleted:    other/NotoSansJavanese-Regular.ttf
 deleted:    other/NotoSansTifinagh-Regular.ttf
 deleted:    other/NotoSerifGeorgian-Bold.otf
 deleted:    other/NotoSerifGeorgian-Regular.otf

 modified:   fonts.mk
 modified:   other/Android.bp

Replacements for the above deleted files:
 new file:   other/NotoSansAdlam-VF.ttf
 new file:   other/NotoSansGeorgian-VF.ttf
 new file:   other/NotoSansJavanese-Regular.otf
 new file:   other/NotoSansTifinagh-Regular.otf
 new file:   other/NotoSerifGeorgian-VF.ttf

New additions to Android fonts (living/revival languages):
 new file:   other/NotoSansGunjalaGondi-Regular.otf
 new file:   other/NotoSansHanifiRohingya-Regular.otf
 new file:   other/NotoSansKhojki-Regular.otf
 new file:   other/NotoSansMasaramGondi-Regular.otf
 new file:   other/NotoSansWancho-Regular.otf
 new file:   other/NotoSansWarangCiti-Regular.otf

Test: ===================================================
Test: on Android (click on a link within a browser):
Test: Adlam https://en.wikipedia.org/wiki/Adlam_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_Extended
Test: Gunjala Gondi https://en.wikipedia.org/wiki/Gunjala_Gondi_(Unicode_block)
Test: Hanifi Rohingya https://en.wikipedia.org/wiki/Hanifi_Rohingya_(Unicode_block)
Test: Javanese https://en.wikipedia.org/wiki/Javanese_(Unicode_block)
Test: Khojki https://en.wikipedia.org/wiki/Khojki_(Unicode_block)
Test: Masaram Gondi https://en.wikipedia.org/wiki/Masaram_Gondi_(Unicode_block)
Test: Tifinagh https://en.wikipedia.org/wiki/Tifinagh_(Unicode_block)
Test: Wancho https://en.wikipedia.org/wiki/Wancho_(Unicode_block)
Test: Warang Citi https://en.wikipedia.org/wiki/Warang_Citi_(Unicode_block)
Test: ===================================================
Test: on Android (click on a link within a browser):
Test: udhr Adlam https://unicode.org/udhr/d/udhr_fuf_adlm.html
Test: udhr Georgian https://unicode.org/udhr/d/udhr_kat.html
Test: udhr Gunjala Gondi NA (Not Available)
Test: udhr Hanifi Rohingya NA (Not Available)
Test: udhr Javanese https://unicode.org/udhr/d/udhr_jav_java.html
Test: udhr Khojki NA (Not Available)
Test: udhr Masaram Gondi NA (Not Available)
Test: udhr Tifinagh https://unicode.org/udhr/d/udhr_tzm_tfng.html
Test: udhr Wancho NA (Not Available)
Test: udhr Warang Citi NA (Not Available)
Test: ===================================
Test: on Android (comparing two systems - before/after)
Test: Georgian: Systems settings menus compared side by side
Test: ===================================
Test: on Mac (comparing the existing Android fonts with the new font
Test: using diffenator - https://github.com/googlefonts/fontdiffenator)
Test: ===================================
Test: SansAdlam-VF: VALIDATED
Test: SansGeorgian-VF: VALIDATED
Test: SansGunjalaGondi: NEW (No Applicable)
Test: SansHanifiRohingya: NEW (No Applicable)
Test: SansJavanese: VALIDATED
Test: SansKhojki: NEW (No Applicable)
Test: SansMasaramGondi: NEW (No Applicable)
Test: SansTifinagh: VALIDATED
Test: SansWancho: NEW (No Applicable)
Test: SansWarangCiti: NEW (No Applicable)
Test: SerifGeorgian-VF: VALIDATED

Change-Id: I86d46f4b6404509a2e7792473a321f5538b9eb19
Signed-off-by: Marek Z Jeziorek <marekj@google.com>
(cherry picked from commit a28399dbaf7ca0261ac2f860807292c7821fe75f)
2020-02-28 14:34:56 +00:00
Rashed Abdel-Tawab
3046630c6a
Reword outdated fonts comment
ADDITIONAL_FONTS_FILE is dead as of 3328d1ce55322f344505173860ebf0525784fb62.
Explain how to install new fonts on /product instead.

Change-Id: I8a519d2a7a50847e7682473c43e58c4bfe1add5b
2019-10-11 14:18:30 -07:00
Jungshik Shin
2aff67d492 Use NotoSansMyanmar (pure Unicode) fonts
Instead NotoSansMyanmar*-ZawDecode (Unicode-Zawgyi hybrid) fonts,
go back to NotoSansMyanmar and NotoSansMyanmarUI (pure Unicode) fonts.

Bug: 141019225
Change-Id: Ib2494b9b5cb148f598e69271c5676e7104f66ae3
2019-09-18 01:01:09 -07:00
Amin Shaikh
2b22df1e29 Move product only fonts out of AOSP.
Bug: 122975603
Test: make
Change-Id: Iee9cceebca1978631e22f9bd47032168de690c1a
2019-04-02 21:19:31 +00:00
Amin Shaikh
447075ba44 Add FontNotoSerifSourceOverlay to AOSP.
Add serif-bold alias in fonts.xml

Bug: 123570171
Test: make
Change-Id: If591de85bfe5d55776b9b660d034204e0d5877bb
2019-01-29 13:09:21 -05:00
Santiago Etchebehere
9915bcb248 Update fonts.xml with user customization fonts.
Reapply the change reverted in ag/5943332 now that
    ag/5979911 fixed the font issue.

Bug: 118756857
Test: make
Change-Id: I1aefbad199e2717b3e5027c37c301b47fefff684
2019-01-09 15:09:35 -08:00
Seigo Nonaka
f8014d9e8d Use Myanmar ZawDecode font for elegant height text
Bug: 113596573
Test: TreeHugger
Change-Id: Ibbf8ef04c93721952841eb2ae60b1fc038f263dd
2019-01-03 14:39:20 -08:00
Seigo Nonaka
4f180e81de Drop ZawDecode font
Bug: 113596573
Test: N/A
Change-Id: Ibb61cad47deabf079bb13c3333c86c1a17050c69
2018-12-21 23:00:54 +00:00
Seigo Nonaka
30b26ccda6 Fix missing glyph in Chakma font
The new font is otf, so renaming in fonts.xml

Bug: 120921018
Test: manually done
Change-Id: Icf30bcdf930932d34eac46ea10e8ae380010f6b5
2018-12-19 23:08:15 +00:00
Seigo Nonaka
3328d1ce55 Introduce OEM customization XML parser
As the initial version of the OEM customization XML, support
new-named-family customization. This allows OEMs to add new named
family.

Bug: 111544833
Test: atest FrameworksCoreTests:android.graphics
Change-Id: If58711fc038898175fcad0ae095865312bd738e2
2018-09-28 15:59:15 -07:00
Seigo Nonaka
c7b3e62f0d Introduce system font enumeration API
To be able to use font file in their apps, provides blob and path to the
font file and locale list as well.

Bug: 26116537
Test: atest CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest
    CtsGraphicsTestCases:android.graphics.font

Change-Id: I1ae1302c6906b808012e1e91b1e4ab393c887cb6
2018-09-05 14:54:12 -07:00
Marek Jeziorek
abd4694f69 Add Medium weight OTF to 8 existing scripts.
See the companion CL ( Iae55e14b11256ccdd2c55f7252e7cd823763f18b )
for more details .

Bug: 77973710

Test: See Iae55e14b11256ccdd2c55f7252e7cd823763f18b .
Change-Id: I4c599c7c1305278392a0527ed0de601fc5586468
2018-05-04 19:16:54 +00:00
Marek Jeziorek
de02786532 Change fonts.xml to add 34 new fonts in OTF.
See the companion CL ( If78de54572a48551da0ab2fd5027ca8389d21988 )
for more details .

Bug: 74406309

Test: m fontchain_linter
Test: See If78de54572a48551da0ab2fd5027ca8389d21988 .

Change-Id: Ib3c827a32028af8fa6fe84203c7983ab45f65853
2018-04-02 16:29:40 +00:00
Jungshik Shin
e6f493c15e Add Osage and Chakma fonts to fonts.xml
Bug: 62420016, 62419886
Test: https://en.wikipedia.org/wiki/Osage_alphabet#Unicode
Test: https://en.wikipedia.org/wiki/Chakma_alphabet#Unicode
Change-Id: I056fa35be015732ea0c57ce20a200c7c8edfc1cc
2018-02-01 15:52:58 -08:00
TreeHugger Robot
8cfd3d03de Merge "Use serif fonts for serif fallback." 2017-11-21 01:40:34 +00:00
Seigo Nonaka
99a7b60e51 Use serif fonts for serif fallback.
Bug: 31491668
Test: m -j1024 fontchain_lint
Change-Id: Ic1d356aa684f2284b0b0fc8de5d0e36380eb44bc
2017-11-20 14:46:31 -08:00
Colin Cross
4db5cb7ba3 Merge "Add output file and dependencies to fontchain_lint" am: b0a3e9dc83 am: 4db8be0bb3
am: c181b06021

Change-Id: Id001092f532e66c896dfb7baf83aa4e810d2cd6e
2017-11-20 20:54:14 +00:00
Nan Zhang
24c9924797 Merge "Build fontchain_lint using python_binary_host" am: 7ecac139ea am: 7ade558ad2
am: 67695d3aff

Change-Id: I850304f79c1c35bfeb6951307b8ca2365da0330b
2017-11-17 22:30:37 +00:00
Colin Cross
f5de525ee3 Add output file and dependencies to fontchain_lint
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
2017-11-17 18:11:09 +00:00
Nan Zhang
2db709de30 Build fontchain_lint using python_binary_host
Test: out/host/linux-x86/bin/fontchain_lint
out/target/product/generic/system true external/unicode
Bug: b/27727331

Change-Id: Ib9353d2338c3b939027069f49e3e847c65526581
2017-11-17 09:22:12 -08:00
Roozbeh Pournader
c9c6ee667f Merge "Support multiple languages per font in fonts.xml" 2017-08-11 23:27:50 +00:00
Roozbeh Pournader
99975a3e25 Support multiple languages per font in fonts.xml
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
2017-08-11 12:34:26 -07:00
Roozbeh Pournader
2d8961d99f Fix various Hangul Jamo bugs in DroidSansFallback
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
2017-08-09 13:49:31 -07:00
Roozbeh Pournader
83041a5956 Add Roboto Condensed Medium to fonts.xml
Bug: 62201012
Test: make -j checkbuild
Change-Id: I0992aa6ddbcd833c0499af280bb6fb8e88d1475f
2017-05-31 16:46:58 -07:00
Andrew Sapperstein
7459bc49b0 Create fonts.xml module for adding fonts.xml to system/etc
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
2017-05-30 16:49:14 -07:00
Roozbeh Pournader
6f84f86f59 Move Phags-pa and Yi fonts to the end of fallback chain
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
2017-05-10 23:26:32 +00:00
Roozbeh Pournader
d6e9a6028a Add Adlam font to fonts.xml
Change-Id: If6b4b9138b9b761360cfdd3c1ba9659739af6402
Fixes: 37156487
Test: not needed
2017-04-13 16:04:47 -07:00
Seigo Nonaka
ff55115121 Reorganize font enumeration API.
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
2017-04-03 13:55:07 -07:00
Jungshik Shin
88b1114010 Use variable fonts for Noto Sans Khmer
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
2017-03-31 19:31:13 +00:00
Roozbeh Pournader
1d0e57c2f8 Add 25 Noto fonts for historic scripts to fonts.xml
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
2017-03-13 15:03:38 -07:00
Roozbeh Pournader
19b05500b7 Document future removal or move of fonts.xml
Users are referred to alternative ways to find the data.

Test: not needed
Change-Id: I399b3aed8d04b0eecf163f61faba8fd5babc74de
2017-02-27 08:32:41 -08:00
Roozbeh Pournader
a27acfdebc Add font descriptions for six more scripts to fonts.xml
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
2016-12-19 15:19:35 -08:00
Roozbeh Pournader
aba60b542e Remove Droid Sans Fallback from all builds
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
2016-12-13 22:53:52 +00:00
yirui
f9936b9b7c Fix incorrect emoji presentation for 'Zsym' script
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
2016-09-14 10:30:59 +09:00
Doug Felt
1d69547fb9 Update fonts.xml file for new noto fonts.
- Tibetan Bold, Symbols-Regular-Subsetted2.

Bug: 27531263
Bug: 26862061
Change-Id: I356bdf438748f29a6fbb5e199902fa574dd08da8
2016-04-14 03:26:18 +00:00
Ying Wang
d5b46b19c6 Fix dependency for fontchain_lint
fontchain_lint scans directories in $(TARGET_OUT). There is no better
target working as dependency than the system.img.

Change-Id: I560b89f697e5ebd4f1e44a150f5af37996cf427e
2016-04-05 10:26:14 -07:00
Roozbeh Pournader
27ec3ace18 Re-enable emoji font tests
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
2016-03-31 13:23:15 -07:00
Roozbeh Pournader
fa1facc0fd Add emoji-related tests for the font chain
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
2016-03-16 13:57:22 -07:00
Roozbeh Pournader
0e969e2c0b Add test script for sanity of font fallback chain
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
2016-03-10 18:07:15 -08:00
Roozbeh Pournader
9bd17ce738 Annotate fonts.xml with intended scripts
Add various ISO 15924 codes to fonts.xml, as a signal for better
font selection in Minikin.

Bug: 27582800
Bug: 26187231
Change-Id: Ie06c156e0179e79c15cf2d66d577c3d36571860d
2016-03-09 21:46:15 -08:00
Roozbeh Pournader
b48f309e91 Merge "Restore DroidSansFallback to fonts.xml" 2016-02-05 18:35:14 +00:00
Roozbeh Pournader
3c8bec10a6 Restore DroidSansFallback to fonts.xml
The font was mistakenly removed in
Ib69e73a6682d7eedd7b824f1dadc79cbccf07605, while it is still built
for SMALLER_FONT_FOOTPRINT devices.

Change-Id: Icb62ef6ef7445255191c70110a2b5eb4105628ce
2016-02-04 14:22:20 -08:00
Ben Wagner
cee5f2023b Remove unused fonts.
The fonts being removed are no longer referenced.

Change-Id: I3029bdc817a39f5000a1c3d067afc1d40e859b93
2016-02-04 15:02:00 -05:00
Ben Wagner
8466f3c879 Remove NanumGothic and DroidSansFallback from fonts.xml.
These two fonts are no longer installed on a device.
This leaves the fonts themselves in place for the sdk build.

Change-Id: Ib69e73a6682d7eedd7b824f1dadc79cbccf07605
2016-01-21 11:54:06 -05:00
Seigo Nonaka
dcf2ea2fbe Replace Qaae script with Zsye
The emoji variant script "Zsye" is registered in ISO 15924.

Bug: 26226285
Change-Id: Ie561d8192c4ec8f242706339ca67b44133867e50
2016-01-05 21:53:53 +00:00
Ben Wagner
8349b7a063 Use 'index' instead of 'ttcIndex' for attribute name.
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
2015-12-12 05:57:14 +00:00
Seigo Nonaka
c73b2257ad Use NotoSansCJK-Regular.ttc instead of separated font files.
BUG: 10861108
BUG: 21079737
BUG: 26113320
Change-Id: I61426fb435c59f7614d14b1135e2f2ffaaa84c73
2015-12-11 09:50:03 -08:00
Seigo Nonaka
460d119e36 Add Emoji "lang" attribute for NotoColorEmoji.ttf
This is needed by Minikin to choose the best font when text and emoji
variation selectors are used.

BUG=11256006

Change-Id: I5774fdf0190dcc42ec827ef5dcec8cdbd28ee925
2015-12-03 09:20:03 -08:00
Roozbeh Pournader
9eeeea5ea6 am 0f3ac894: am c91b67ad: am 31a536e1: am 57928364: am 53c38c88: Merge "Revert "Create a special CONSTRAINED font bucket in frameworks."" into mnc-dev
* commit '0f3ac8944a712f087041d088d82eaa53b1a7b47b':
  Revert "Create a special CONSTRAINED font bucket in frameworks."
2015-08-19 02:21:30 +00:00
Roozbeh Pournader
bbf0c88e6c Revert "Create a special CONSTRAINED font bucket in frameworks."
This reverts commit 9e21eced5efacd605036be599d96974964deb09b.

Bug: 22929087
2015-08-18 12:17:13 -07:00