91 Commits

Author SHA1 Message Date
Gary Qian
13ece5c7fc
Update the ui.LineMetrics.height metric to be more useful to external users (#11456) 2019-08-28 12:26:42 -07:00
Chris Bracken
bf86d08102
Add missing newline at EOF (#11473)
This was required by the C++ spec pre-C++11 and still gets picked up in
the Fuchsia tree due to -Wnewline-eof. It fixes:

    ../../third_party/flutter/lib/ui/text/line_metrics.h:75:47: error: no newline at end of file [-Werror,-Wnewline-eof]
    #endif  // FLUTTER_LIB_UI_TEXT_LINE_METRICS_H_
2019-08-26 21:11:57 -07:00
Gary Qian
9f1eab2f1f
Expose LineMetrics in dart:ui (#10670) 2019-08-26 13:40:22 -07:00
Jason Simmons
33d168f99f
Remove the ParagraphImpl class from the text API (#11012)
ParagraphImpl was used to switch between libtxt and Blink implementations
of text rendering and is now obsolete.
2019-08-15 15:23:00 -07:00
Jason Simmons
f7e0614b88
Change ParagraphBuilder to replace the parent style's font families with the child style's font families (#10074)
Previously ParagraphBuilder was concatenating the child's fonts to the
parent's font list, causing the parent's fonts to take precedence.

Fixes https://github.com/flutter/flutter/issues/35992
2019-07-23 17:57:56 -07:00
Jason Simmons
2cd650d269
Minimal integration with the Skia text shaper module (#9556)
This converts the libtxt Paragraph and ParagraphBuilder classes into
interfaces with Minikin and SkShaper/SkParagraph based implementations.

Use the --enable-skshaper GN flag to select the Skia shaper implementation
at build time.
2019-07-10 14:13:55 -07:00
Jason Simmons
b453d3c3dd
libtxt: fix reference counting of SkFontStyleSets held by font asset providers (#9561) 2019-07-10 12:08:15 -07:00
Gary Qian
75387dbc14
TextStyle.height property as a multiple of font size instead of multiple of ascent+descent+leading. (#9041) 2019-07-08 15:32:02 -07:00
Gary Qian
a4abfb2333
Text inline widget LibTxt/dart:ui implementation (#8207) 2019-06-03 10:32:46 -07:00
Jason Simmons
135a140591
Add font features (such as tabular numbers) as an option in text styles (#8823)
Fixes https://github.com/flutter/flutter/issues/31691
2019-05-21 16:47:57 -07:00
Matthew Dempsky
66087301cd Roll tonic and update #includes (#8950) 2019-05-14 11:57:09 -07:00
Justin McCandless
3493dcfbae
Rename tightWidth to longestLine (#8706)
Renaming a brand new and unused parameter due to some discussion about connecting with the framework.
2019-04-26 16:06:12 -07:00
Justin McCandless
a144f17aee
Tight Paragraph Width (#8530)
Calculate and expose paragraph tightWidth to the framework to allow drawing Text based on this.
2019-04-18 09:08:41 -07:00
Chinmay Garde
39e1d00f39
Remove redundant specification of the |flutter| namespace in the engine. (#8523) 2019-04-09 17:50:06 -07:00
Chinmay Garde
eec74e5c92
Rename the blink namespace to flutter. (#8517)
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
2019-04-09 12:44:42 -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
Gary Qian
073aadde14
Fix TextStyle decode misalignment (#8141) 2019-03-12 13:55:31 -07:00
Gary Qian
52b67fdd5a
Expose decorationThickness to dart:ui (#8008) 2019-03-11 16:43:11 -07:00
Gary Qian
2c610bfec6
Fix dynamic array -> vector (#7645) 2019-01-30 13:03:27 -08:00
Gary Qian
c92df428ef
Strut implementation (#7414)
Engine half of flutter/flutter#26332
2019-01-30 10:16:37 -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
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
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
4b233f033b
Support overriding font leading in TextStyle and LibTxt (#6927) 2018-12-10 15:35:44 -08:00
Michael Goderbauer
09ef73ff6e
Fix code smells reported by chrome's clang plugin (#6833) 2018-11-12 19:59:29 -08:00
Michael Goderbauer
70a1106b50
Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
Mehmet Fidanboylu
3236b49cea
Add missing includes (#6670) 2018-10-26 10:16:56 -07:00
Gary Qian
9f2e2ba7b9
Add/expose API for Paragraph.getBoxesForRange BoxHeightStyle and BoxWidthStyle. (#6644) 2018-10-24 15:22:32 -07:00
Chinmay Garde
e1e60933b2
Realize kernel asset mappings on a worker thread if one is available. (#6648) 2018-10-24 11:33:46 -07:00
Gary Qian
2586e94122
Support all combinations of GetRectsForRange styles (#6591) 2018-10-23 11:06:21 -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
Gary Qian
5f529566c9
Add support for text shadows (#6385)
Text shadows can now be added to a TextStyle by providing a List<Shadow>. The dart:ui Shadow class is now the base class to flutter BoxShadow.
2018-10-12 09:09:18 -07:00
Zachary Bush
2c5d0c407f [rapidjson] Fix import statements (#6418) 2018-10-03 17:33:45 -07:00
Gary Qian
3a9c22afde
Allow GetRectsForRange to provide more detailed/nuanced metrics through RectStyle enum. (#6335)
* Let GetRectsForRange provide more detailed/nuanced metrics through RectStyle enum.
2018-10-01 17:01:45 -07:00
Brian Osman
1e622d24d9
Update to newer Skia font API (#6236)
This function now takes an sk_sp
2018-09-12 10:47:29 -04:00
Chinmay Garde
9f8285ac6c
Remove all dependencies on Garnet. (#5869) 2018-07-26 12:49:34 -07:00
Jason Simmons
0bad812c72
Migrate to a standalone Tonic repository separated from Topaz (#5817) 2018-07-23 11:49:35 -07:00
Jason Simmons
e18f239037
Purge the Skia font cache after deleting an engine's FontCollection (#5598)
See https://github.com/flutter/flutter/issues/18728
2018-06-25 13:23:46 -07:00
bungeman
f9998a07bd Change ports/SkFontMgr.h to core/SkFontMgr.h (#5593)
Skia is moving ports/SkFontMgr.h to core/SkFontMgr.h. The existing
ports/SkFontMgr.h is now just a forwarding header to keep users working
through the transition. Update includes to point to the new location.
2018-06-22 11:04:58 -04:00
Ryan Macnak
fe9dd64d70
Replace AssetResolver GetAsBuffer with GetAsMapping. (#5546)
Toward no-copy loading of kernel.
2018-06-19 14:24:19 -07:00
Jason Simmons
c3c40cf958
Lazily load fonts that are embedded within the application (#5533)
Previously the engine would load all embedded fonts listed in the app's
font manifest during startup.  This change creates a Skia font manager that
is backed by the engine's AssetManager and can load embedded font assets
on demand.
2018-06-14 16:13:56 -07:00
Jason Simmons
efd6663344
Maintain a FontCollection for each engine instance instead of a process-wide singleton (#5521) 2018-06-13 14:28:21 -07:00
Dan Field
8f023c5dac
Allow custom foreground paint to be used for drawing text (#5395)
* Allow specifying the foreground paint

* fix typo

* doc update

* call paint.reset
2018-06-10 00:21:18 -04:00
Jason Simmons
4a4cff96d4
Remove Blink code (#5218)
Fixes https://github.com/flutter/flutter/issues/12212
2018-05-10 15:57:29 -07:00
Jason Simmons
11d50441a6
Provide an SkPaint that describes the background of a text style (#5153)
Fixes https://github.com/flutter/flutter/issues/11961
2018-05-09 11:36:52 -07:00
Chinmay Garde
58e84c8bf0
Re-land "Support multiple shells in a single process. (#4932)" (#4998)
* Re-land "Support multiple shells in a single process. (#4932)"

This reverts commit 723c7d01439da4261bc836075fb55651ce9e7f03.
2018-04-13 13:48:15 -07:00
Vyacheslav Egorov
723c7d0143
Revert "Re-land "Support multiple shells in a single process. (#4932)" (#4977)" (#4981)
This reverts commit a3327bff86800b3e654a2988fa7e6049edeb679c.
2018-04-12 18:28:55 +02:00
Chinmay Garde
a3327bff86
Re-land "Support multiple shells in a single process. (#4932)" (#4977)
This reverts commit 9199b40f2a2a6e448cd251de44e020ec3b75002d.
2018-04-11 15:41:23 -07:00
Chinmay Garde
9199b40f2a
Revert "Support multiple shells in a single process. (#4932)" (#4964)
This reverts commit 6baff4c821350bbcb64e7d029574b567f3801a1a.
2018-04-10 15:28:43 -07:00