-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Closed
Labels
a: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Milestone
Description
Some fonts have different variant glyphs based on the locale. This is critical for Chinese, Chinese (Simplified), Japanese, and Korean; it is also used for other scripts (e.g. Latin vs Romanian).
OpenType encodes this using the locl
feature tag.
There are some resources to test this online, e.g. the LOCL Test font.
It is common to not know what locale to use. In that case, we should default to no locale and allow the font to pick its default.
- Pass the locale through from the framework to the engine. Each
TextSpan
should take an optionalLocale
; by default it should inherit the value fromParagraphStyle
which should have aLocale
also. - Use the locale in the engine to configure the font rendering by setting it in the
minikin::TextStyle
structure. - Test this.
Metadata
Metadata
Assignees
Labels
a: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.