gtest is an old version that predates the googletest and googlemock
merger, all tests should be using the newer googletest that's being
kept in sync with the upstream version.
Minikin layout uses a FontCollection containing a list of pre-selected fonts
for a particular font family. This patch extends the FontCollection to invoke
a hook provided by libtxt if layout sees a character that can not be rendered
by any font in the collection.
* Change the Minikin lock to a recursive mutex. This is required because the
fallback font provider may create new fonts during a layout operation that
already holds the lock.
* Implement a fallback font provider hook that queries Skia for fonts matching
an unrecognized character.
* Maintain a cache of fallback fonts. Prepopulate the cache with fonts
covering some commonly used character classes.
* Add a last resort font list for cases where Skia's font manager can not
find any font for a character (similar to Blink's FontCache::getLastResortFallbackFont)
* GetGlyphPositionAtCoordinate maps points within the right half of a
glyph to the next position
* The second pass in RepeatLayoutParagraph was at the borderline between 5
and 6 lines in the Minikin line breaker. Add text to ensure that the text
fills 12 lines at half width and 6 lines at full width.
Minikin layout uses a FontCollection containing a list of pre-selected fonts
for a particular font family. This patch extends the FontCollection to invoke
a hook provided by libtxt if layout sees a character that can not be rendered
by any font in the collection.
* Change the Minikin lock to a recursive mutex. This is required because the
fallback font provider may create new fonts during a layout operation that
already holds the lock.
* Implement a fallback font provider hook that queries Skia for fonts matching
an unrecognized character.
* Maintain a cache of fallback fonts. Prepopulate the cache with fonts
covering some commonly used character classes.
* Add a last resort font list for cases where Skia's font manager can not
find any font for a character (similar to Blink's FontCache::getLastResortFallbackFont)
* newly pushed styles should inherit from the top of the paragraph's style
stack, not the most recently added style in StyledRuns
* make the paragraph-level style a default that is not pushed onto the stack
and can not be popped
Previously GetRectsForRange was assigning each rectangle a height matching the
height of the entire line. If the line includes multiple text styles, callers
will expect each span's rectangle to reflect the height of that span.
(see text_painter_rtl_test.dart)
* Call the ICU bidi API to divide the text into LTR/RTL runs and merge
them with the styled runs defined by the application
* Maintain a list of glyph positions sorted by the order of the corresponding
code units in the text, as well as a list of glyphs sorted by x/y coordinates
in the layout
* Added Windows support for libtxt in order to build flutter_tester.exe.
Relatively minor changes were needed to get libtxt building on Windows
(missing/incompatiable headers, the odd syscall, path separators, etc.).
Windows doesn't render text in the same way as other platforms, so some tests
that checked for specific pixel offsets are disabled.
minikin::LineBreaker does not convert newline characters into line breaks
in its output. Previously libtxt's version of LineBreaker container a patch
that added a large width offset for a newline in order to force wrapping to
the next line. This works if the offset exceeds the paragraph's width
constraint. But if the paragraph is laid out with infinite width, then the
text after the newline will continue on the current output line.
This change separates the paragraph's text into newline delimited blocks and
feeds each block separately to the minikin LineBreaker.
Also, libtxt was breaking the input styled text runs at newline boundaries.
This is no longer necessary.
maxIntrinsicWidth is the sum of the width of all lines in the input
(if the width were any smaller, the renderer might have to wrap a line)
minIntrinsicWidth is the maximum width of a word (if the paragraph were
any narrower, the renderer would have to truncate a word)
This changes Paragraph::Layout to iterate line-by-line through the text.
For each line, Layout scans for word boundaries and adds extra space between
words if the line is justified.
* Change to new SkFontMgr API
These changes clarify ownership rules and work today. They will be
necessary once SK_SUPPORT_LEGACY_FONTMGR_API goes away.
* Fix spacing
* Formatting