liyuqian
9bfa96dee9
Add trace events for creating minikin fonts ( #8477 )
...
Creating fonts can take a long time (50ms+) during frame build in the UI
thread. Trace them to help us understand when it's causing a jank.
2019-04-09 10:21:12 -07:00
Zachary Anderson
efbecd7e8e
[txt] Add back FontCollection::SetDefaultFontManager ( #8410 )
2019-04-02 10:22:12 -07:00
Jason Simmons
1339011991
libtxt: track the start and end x positions of glyph blobs for more accurate rendering of text decorations ( #8368 )
...
Fixes https://github.com/flutter/flutter/issues/30041
Fixes https://github.com/flutter/flutter/issues/24337
2019-03-29 13:01:37 -07:00
Jason Simmons
6d1a6a4f47
Allow per-platform customization of the default Skia font manager ( #8358 )
...
The font manager returned by SkFontMgr::RefDefault is determined by Skia's
build configuration flags. Embedders may want to use a default font manager
other than the one selected by their build of Skia.
2019-03-29 09:52:29 -07:00
Jason Simmons
7cbbdb4002
libtxt: more accurate tracking of run positioning and width for justified text ( #8214 )
...
Fixes https://github.com/flutter/flutter/issues/28891
2019-03-19 14:43:54 -07:00
Gary Qian
52b67fdd5a
Expose decorationThickness to dart:ui ( #8008 )
2019-03-11 16:43:11 -07:00
Core
302e2e9d2d
Fix cursor jumping when typing some special characters. ( #7964 )
2019-02-28 17:44:49 -08:00
Jason Simmons
1d0615af4e
libtxt: remove a debug log message in ComputeStrut ( #7953 )
2019-02-25 17:43:32 -08:00
Gary Qian
21c59197e7
[re-land] Use all font managers to discover fonts for strut. ( #7803 )
2019-02-22 13:44:02 -08:00
Stanislav Baranov
aa2b287cbf
Reland #7777 with proper LICENSE ( #7888 )
2019-02-21 13:45:24 -08:00
Jason Simmons
a5773d1211
Do not add ghost runs for trailing whitespace if the text is ellipsized ( #7906 )
2019-02-21 13:36:33 -08:00
Gary Qian
1263d28abf
Fix caret being at left edge when newline pressed on centered text ( #7875 )
2019-02-19 16:25:42 -08:00
Gary Qian
af39e22c31
Fix tests that were committed after cirrus ran ( #7819 )
2019-02-13 16:27:15 -08:00
Gary Qian
033f2072c3
Add space metrics tracking for trailing whitespace "ghost" runs. ( #7791 )
...
* Begin space tracking metrics in LibTxt.
* Add tracking for trailing whitespace.
* Store is_ghost in BidiRun
* Add comments
2019-02-13 15:19:53 -08:00
Gary Qian
74d94e52c6
Revert "Use all font managers to discover fonts for strut. ( #7734 )" ( #7801 )
...
This reverts commit c4a55552b5f07fdb0bb1db73df08a1843dd7e5a8.
2019-02-12 13:11:16 -08:00
Gary Qian
c4a55552b5
Use all font managers to discover fonts for strut. ( #7734 )
2019-02-12 03:32:59 -08:00
Jason Simmons
a3be1ff580
libtxt: support justification of RTL text ( #7719 )
...
Fixes https://github.com/flutter/flutter/issues/25567
2019-02-11 10:57:28 -08:00
Yunyu Lin
f38f03fc88
Replace hb_face_reference_table with hb_ot_color_has_png in isColorBitmapFont ( #7686 )
2019-02-04 16:59:12 -08:00
Gary Qian
c92df428ef
Strut implementation ( #7414 )
...
Engine half of flutter/flutter#26332
2019-01-30 10:16:37 -08:00
reed-at-google
747d125471
IWYU, esp. since SkFontMetrics.h is leaving SkPaint.h ( #7545 )
2019-01-22 10:08:55 -05:00
reed-at-google
dde2866738
IWYU to get SkFontMetrics ( #7539 )
2019-01-21 11:18:40 -05:00
Gary Qian
b7e0527982
Add Ahem to LibTxt testing fonts. ( #7435 )
2019-01-14 18:02:29 -05:00
Chris Bracken
788dea5ddb
Eliminate std::string using directive ( #7433 )
...
Eliminates a using std::string directive that conflicts with a
Google-internal using directive in base libs.
This applies a small subset of an upstream Minikin patch.
2019-01-10 11:52:36 -08:00
Jason Simmons
cd98f6bdb5
Clear the font collection's cache when a font is dynamically loaded ( #7436 )
...
Fixes https://github.com/flutter/flutter/issues/26293
2019-01-10 11:26:49 -08:00
Dan Field
4036b260aa
Reset ParagraphBuilder after build() ( #7401 )
...
* Reset ParagraphBuilder after build()
2019-01-07 16:10:53 -08:00
Rusino
4d353de493
Preparing to remove SK_SUPPORT_LEGACY_PAINT_TEXTMEASURE ( #7354 )
...
* Preparing to remove SK_SUPPORT_LEGACY_PAINT_TEXTMEASURE
* Fixing a bug
* Formatting problem
2019-01-02 16:23:35 -05:00
Gary Qian
54d7c42566
Paint all backgrounds first to prevent overlap ( #7287 )
2019-01-02 16:22:05 -05:00
Gary Qian
215ca15600
Support user-provided font-fallback. ( #7241 )
...
* Support user-provided font-fallback.
* Use tonic to pass to native
* Handle font families as a fallback vector in LibTxt
* Fix docs
* Concatentate fontFamily lists in dart before passing to engine
* Fix formatting
* Reworked font family matching to search all managers
* Fix formatting
* Proper toString null checking to keep format consistent
* Formatting
* Move _listEquals out of textstyle as it is not specific to TextStyle and will later be used for paragraphStyle too
2018-12-21 15:07:47 -08:00
Anthony Bullard
1bc7ccf605
Support real fonts in 'flutter test' ( #6913 )
...
* Support real fonts in 'flutter test'
Change the order of font_managers to query in font_collection
so that dynamic_font_manager fonts will be resolved.
Tested with test case in `flutter/flutter` repo:
`packages/flutter/test/rendering/localized_fonts_test.dart`
Ensured:
- A font loaded with FontLoader will be used
- The default 'Ahem' font is still loaded by default
The test above still cannot be fixed because FontLoader and the
underlying mechanisms don't cover Locale-specific font loading
and therefore a CJK font-family won't be able to be loaded as needed
for that test.
Fixes #17700
* Format fixup
2018-12-14 10:05:41 -08:00
Gary Qian
eff5e67356
Fallback font match caching to fix emoji lag. ( #7208 )
2018-12-13 10:39:09 -08:00
Gary Qian
25b58c0c67
Revert "Support overriding font leading in TextStyle and LibTxt ( #6927 )" ( #7187 )
...
This reverts commit 4b233f033b8ba7b7e5e84f1607dbdf2e4dcdc5d8.
2018-12-11 10:43:03 -08:00
Gary Qian
b0a3c74ca5
Check for empty line before adding empty 'padding' metrics ( #7185 )
2018-12-11 10:33:10 -08:00
Gary Qian
4b233f033b
Support overriding font leading in TextStyle and LibTxt ( #6927 )
2018-12-10 15:35:44 -08:00
Gary Qian
25c6c1be1a
Add empty metrics to account for truncated whitespace for GetRectsForRange. ( #7164 )
2018-12-10 15:30:46 -08:00
Jason Simmons
9611d746b8
Merge master branch into skia-master
2018-12-10 14:48:10 -08:00
Gary Qian
23788485a5
Minor comment fix and add TODO. ( #7158 )
2018-12-10 14:03:10 -08:00
Rusino
950275ba1f
Old unnoticed changes (Paint->Font) for txt_benchmarks and making ( #7068 )
...
changes for removed SK_SUPPORT_LEGACY_TEXTENCODINGENUM
2018-12-03 17:00:37 -05:00
Rusino
9e16646ac3
Remove SK_SUPPORT_LEGACY_TEXTBLOBBUILD_WITH_PAINT ( #6971 )
...
* Remove SK_SUPPORT_LEGACY_TEXTBLOBBUILD_WITH_PAINT
* Formatting change
2018-11-28 09:05:31 -05:00
KyleWong
2c389678f0
Fix a minikin crash (nullptr& EXC_BAD_ACCESS) on iOS8. ( #6795 )
...
* Fix a minikin crash (nullptr& EXC_BAD_ACCESS) on iOS8.
* Use find for vector to avoid side effect.
2018-11-12 11:21:20 -08:00
Rusino
14db8b397a
SkPaint::FontMetrics -> SkFontMetrics ( #6824 )
...
* SkPaint::FontMetrics -> SkFontMetrics
* fix file formatting
* another attempt to correct file formatting
2018-11-12 12:55:34 -05:00
Rusino
16f8c67f0b
Update paint hinting for upcoming Skia API changes. ( #6802 )
2018-11-08 16:53:24 -05:00
Mehmet Fidanboylu
94dd7165ef
Skia Cleanup ( #6786 )
2018-11-07 15:29:52 -08:00
Michael Goderbauer
70a1106b50
Unify copyright lines ( #6757 )
2018-11-07 12:24:35 -08:00
Gary Qian
dda667f8f0
Roll update to harfbuzz to 2.1.0 ( #6760 )
2018-11-06 12:41:12 -08:00
Mehmet Fidanboylu
3236b49cea
Add missing includes ( #6670 )
2018-10-26 10:16:56 -07:00
Gary Qian
2586e94122
Support all combinations of GetRectsForRange styles ( #6591 )
2018-10-23 11:06:21 -07:00
Gary Qian
3860a43379
Re-revert wrong line_heights implementation ( #6598 )
2018-10-18 14:15:20 -07:00
Mehmet Fidanboylu
e6887a4121
Add missing imports for unicode/utf16.h ( #6524 )
2018-10-12 21:40:32 -07:00
Jason Simmons
32841dd89b
Case-insensitive matching of family names for custom fonts ( #6519 )
2018-10-12 14:32:32 -07:00
Jason Simmons
f2e7441b55
An API for loading fonts from a buffer provided by the application ( #6508 )
2018-10-12 10:27:22 -07:00