39 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
f9273e185b Remove legacy font configuration files.
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
2015-08-10 18:54:05 +00:00
Roozbeh Pournader
912dbdb9fa Move NotoSansSymbols higher than CJK in the fallback chain.
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
2015-06-04 15:39:43 -07:00
Roozbeh Pournader
2d8a02e68b Update Naskh font names to match upstream and add Tibetan.
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
2015-05-19 16:28:18 +00:00
Roozbeh Pournader
47dd50ea16 Rename Noto Han fonts to their latest names.
NotoSansHans has been renamed to NotoSansSC and NotoSansHant has been
renamed to NotoSansTC.

Change-Id: I3c416d1aa753dc9be2c0e4ee1a8d77cdb9cdd4b1
2015-04-29 16:20:07 -07:00
Roozbeh Pournader
a2b6021b52 Support more smaller scripts of Asia and Africa.
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
2015-04-13 16:01:33 -07:00
Roozbeh Pournader
9c5a14785b Switch from Lohit Odia to Noto Sans Oriya fonts.
Noto Sans Oriya fonts also have bold and UI versions, which are added.

Change-Id: Id622143688d89e25857c00489d81703780f79887
2015-04-06 19:28:18 +00:00
Roozbeh Pournader
70f0a4365b Move Noto Sans Tai Le to the end of the font fallback list.
This is to make sure the East Asian punctuation shared between CJK languages
and Tai Le are rendered from the CJK fonts when no language is specified
for the text, or CJK text is rendered in a non-CJK locale.

Also remove the old comment about 64k glyphs limit.

Bug: 19355391
Change-Id: Ic2cbc79cecf9539ace8a432f373685eeff81e106
2015-02-11 15:45:49 -08:00
Roozbeh Pournader
7f45f6dd0c Add 8 more scripts to the font fallback chain.
Fonts for Cham, Coptic, Glagolitic, Kayah Li, Tai Le, Tai Tham, Tai
Viet, and Tifinagh scripts are added to the fallback chain.

This would enable or improve display of texts in Berber languages,
Cham, Church Slavonic, Coptic, Kayah languages, Khün, Northern Thai,
Tai Dam, Tai Dón, Tai Lü, Tai Nüa, and Thai Song.

Bug: 17686019

Change-Id: I689393bc03f3957e1025ac08ab31961a6c6bc24d
2014-11-25 15:06:27 -08:00
Roozbeh Pournader
411b30cb56 Add Lohit Odia (Oriya) font to the fallback chain.
This adds Lohit Odia (Oriya) font as the default font for the Oriya
script to the fallback chain.

Bug: 17686019
Change-Id: If0c60a0f35a029c3761b8ea26a2546ca5c5fa0c0
2014-11-24 13:43:25 -08:00
Roozbeh Pournader
2ff3ba5bfa Use fonts for smaller languages of South and Southeast Asia.
Fonts for Balinese, Batak, Buginese, Buhid, Hanunnoo, Javanese,
Lepcha, Limbu, Meetei Mayek, Ol Chiki, Rejang, Saurashtra, Sundanese,
Syloti Nagri, Tagbanwa, and Thaana scripts are added.

Bug: 17686019
Change-Id: I3fb783874920909e8725097481c9e7d8e35f42f8
2014-11-10 12:49:20 -08:00
Alan Viverette
4f9140b52c Add Cutive Mono as serif monospace font for captioning
Sets up Courier and Courier New to point to Cutive Mono, since
Courier is a serif monospace font.

BUG: 17666124
Change-Id: I96bb2ff59020edd8210c253752f76f0eb5100e18
2014-10-10 12:52:25 -07:00
Raph Levien
117cbebe81 New weight-aware font config
Parse new fonts.xml config file, and resolve weight selection based on
the base weight of the font (as defined by a weight alias specified in
the config file) and the requested bold flag. This change improves the
appearance of bold spans for alternate weights of Roboto.

In addition, this patch enables weight selection for fallback fonts.
For example, if an additional font with a weight of 100 is added to the
Hebrew font family in the fallback list, then requesting
"sans-serif-thin" would select that font for Hebrew text.

Bug: 14538154
Change-Id: I99a04fad4f7bf01c75726e760d42735dd9003496
2014-08-26 19:37:45 -07:00
Raph Levien
8c1f9360ce Add new fonts.xml
This adds a new configration file for fonts with several more features,
most notably the ability to specify numeric weights for fonts in a
family, and specify aliases for weights. This will help help choose an
appropriate font for a "bold" weight request, rather than just applying
auto-bolding.

Bug: 14538154
Change-Id: Ib4d54d66a0c68b7d46e665d7cd94e97b72468e95
2014-08-07 20:57:32 +00:00
Xavier Ducrohet
178006a0e0 Layoutlib now parses system_fonts.xml instead of its own.
Also parse fallback_fonts.
This lets layoutlib automatically use the same fonts as the base
platforms, for instance it now uses the new ICS fonts.

Change-Id: Id6e778dc0e3f2a9112601e0eaf8499a9713ec433
2011-10-04 18:02:10 -07:00
satok
9283f3cd6c Use MOTOYA font for Japanese font
Change-Id: I22c8cdf7f23f09c0cd7d3ffffaeed2a8eeb1fb54
2010-09-22 13:50:27 +09:00
Xavier Ducrohet
9a4593ffcc Support for fallback fonts in layoutlib.
BUG 2041229

Change-Id: Ib12bcb7f6d8f0e4c2b51871f8129ecf51fa938ee
2009-11-09 14:55:08 -08:00
The Android Open Source Project
9066cfe988 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
The Android Open Source Project
d83a98f4ce auto import from //depot/cupcake/@135843 2009-03-03 18:28:45 -08:00
The Android Open Source Project
54b6cfa9a9 Initial Contribution 2008-10-21 07:00:00 -07:00