Targeted suppression of some deprecation warnings that are build errors under
clang:
- Ignore the deprecation of codecvt's unicode conversion until we decide on
a replacement strategy.
- Allow the deprecated posix names of functions in third_party/txt.
Part of https://github.com/flutter/flutter/issues/16256
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
Tonic used to be used by multiple consumers outside of Flutter Engine. Due to
this, it has an unnecessary abstraction layer as well as utilities duplicated in
FML and other engine subsystems. The sole user of Tonic is now the Flutter
Engine. It is intended that the Flutter Engine team now owns this subsystem,
remove unnecessary utilities and document the headers. This is the first step in
the transition. No history is being imported as the initial history was already
lost in the transition of this component to fuchsia.googlesource. As this
component was unmaintained there, I could see no additional value in importing
the history of the patches there.
No functional change. Just moved the repo from //third_party to
//flutter/third_party and updates GN refs.
This will improve font matching for SkParagraph, which relies on the
FontStyleSet's matchStyle implementation to find the closest match for a
FontStyle.
If a new fallback font is discovered during paragraph layout, the fallback
font cache in txt::FontCollection will use that font in future layouts.
However, that cache is not available if the new fallback font needs to be
used for other characters within the current layout. This PR adds a cache
to minikin::FontCollection and checks whether fonts in the cache can handle
a character before calling the fallback font provider.
See https://github.com/flutter/engine/pull/13257
* Check for special case index out of bounds condition for leading space
* Add TODO
* Rework to pass tests
* More robust check for leading
* Minor adjustment
* Fix order bug
* Do not modify for leading space
* Fix test value
* Condition
When Minikin searches for a font based on a font style, it will score the fonts
in the family and choose the best match. However, multiple fonts may have
equal scores (e.g. searching for a font with weight 600 when the set includes
fonts with weights 500 and 700). In this case Minikin will select the first
font in the list with the best score.
However, the fonts in a font family's SkFontStyleSet may not always be provided
in a consistent order by the SkFontMgr. So if the minikin::FontFamily list is
populated based on the SkFontStyleSet order, then a query for a given style might
not always return the same font.
This change sorts the typefaces in the SkFontStyleSet before converting them
into a Minikin font family.
Fixes https://github.com/flutter/flutter/issues/31212