If the start/end range passed to GetRectsForRange includes lines of text
that did not render any glyphs, then GetRectsForRange should add a placeholder
for that line. In particular, the framework expects this so that it can
position the cursor on an empty line when editing text.
Fixes https://github.com/flutter/flutter/issues/16418
* Extend Minikin to record the cluster identifier corresponding to each glyph
* Use the cluster values to determine the range of input code units that map
to a glyph
* Use Minikin's libraries to find boundaries between graphemes within a
ligature
Fixes https://github.com/flutter/flutter/issues/16151
This is a workaround for https://github.com/flutter/flutter/issues/15702
Skia was not drawing the paragraph's text blobs in some cases when a
save/restore sequence is done around the canvas->translate call. The
problem does not occur if an offsetting call to translate is made instead
of the save/restore. Will need to work with Skia to find the root cause.
maxIntrinsicWidth should reflect what the width of the text would be if no
soft line breaks are added. Hard line breaks should still be incorporated
into the maxIntrinsicWidth.
Fixes https://github.com/flutter/flutter/issues/15588
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.
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.