Commit Graph

600 Commits

Author SHA1 Message Date
Gary Qian
ba43d1e989 Take letter spacing into account when linebreaking and initial implementation of GetRectsForRange().
Change-Id: Id7fa1b5b60c988cb73ba182241b3d8b3c998e07c
2017-07-10 14:31:11 -07:00
Gary Qian
3a0422f761 Implement GetGlyphPositionAtCoordinate().
Change-Id: I78528de9d4fa1611ceb857790a3b3945c0988c9c
2017-07-07 12:09:14 -07:00
Gary Qian
7e01820ef8 Prelim ideographic baseline and MinIntrinsicWeight, Arabic test, prepare
for RTL language support implementation.

Change-Id: I99a6af74aa3607ff9b58ba98426ad3026f02b816
2017-07-06 14:46:38 -07:00
Gary Qian
4ed0e488da Add chinese tests, underline fix, cleanup, move fonts to
third_party/fonts.

Change-Id: I1b246534cd364c9e7e3fec3f6bcbe202932fee44
2017-07-06 12:25:48 -07:00
Gary Qian
b6c6f1780e Implement wavy text decoration.
Change-Id: Ie28dc4e833a24a9661e72f32f54a3e7489f81417
2017-07-05 17:20:11 -07:00
Gary Qian
42179e5403 Switch to fuchsia/third_party/benchmark
Change-Id: I40a9dadc1e910d4eb31085a71a372e2144d2d03d
2017-07-05 12:17:19 -07:00
Gary Qian
45dd415ba5 Add low memory setting on FontCollection. Only remove trailing whitespace at end of line, and do not justify last line.
Change-Id: Iee32003624862b3c7f5f2d0e999ef72719302551
2017-06-30 16:51:01 -07:00
Gary Qian
11580cea63 Move font caches to FontCollection and multiple eviction schemes. ~x200 speed improvement.
Change-Id: I1e2f940ddb36f9ac51cc95c42c2f121140ff3f6f
2017-06-30 12:05:11 -07:00
Gary Qian
4c93f0e976 Remove trailing spaces of blobs to fix decoration positioning, justify,
and centering.

Change-Id: Ide66103f95be8c090ab5ddc9888cd4defc5cde51
2017-06-29 18:03:48 -07:00
Gary Qian
d6a6221fc8 Switch to hashmap caching of font collections to be resillient to alternating fonts and slight performance improvement.
Change-Id: Ide3a311819c41e23e88e6dca06f0ce7669f6842c
2017-06-29 16:14:35 -07:00
Gary Qian
4ddb034139 Major efficiency improvements, new benches, and API change to allow changing font collections.
Change-Id: Id33cdcd161d659310d28dd36f415dc01da2e03a7
2017-06-29 15:09:38 -07:00
Gary Qian
7e02287cf9 Add additional benchmarks and initial bigO checks.
Change-Id: I3d2d9186fb187d55319c10260bf7e0d579c65a6f
2017-06-29 12:49:28 -07:00
Gary Qian
704aa0d2bf Only obtain new font if font has changed.
Change-Id: I9a6316854e13ff5f01a34bbfca8750d223a90af8
2017-06-28 19:52:47 +00:00
Gary Qian
f716e8115c Add benchmarking.
Change-Id: I92b8d1d27d5d6b79a831853446e83086fa56a133
2017-06-28 19:52:43 +00:00
George Kulakowski
ea45f66608 Add PATENTS file
Change-Id: Ie25d2b4caa6a805ce76a288b41804700d7d37c5a
2017-06-28 17:07:25 +00:00
Gary Qian
adcdcc19a8 Reorganize text alignment code location and add unit tests.
Change-Id: I3ccfb03230050c4c0f8ae4b7d0c73bf6f3b685ae
2017-06-26 14:00:46 -07:00
Gary Qian
9935045848 Implement initial version of text justification, new tests, and fix bugs
with right and center alignment.

Change-Id: I3b6a547e1d81c966b82108c02d60aa7181cb0b87
2017-06-23 17:03:06 -07:00
Gary Qian
1d9ea69014 Begin to move FontCollection to a multi-manager system.
Change-Id: Ied69fa2d567f695990a754337bab79dc2f17c6ef
2017-06-22 15:45:47 -07:00
Gary Qian
f17cdae74e Prevent multiple calls to layout without changing paragraph.
Change-Id: I64e81606f095e3029161f5a01623df4c1ccbf5a9
2017-06-22 11:40:42 -07:00
Gary Qian
b5d528f279 Implemented early version of text alignment/justification and baselines.
Change-Id: Id36a20bb9c392f09813175677776d9367d8ccfc2
2017-06-21 15:22:27 -07:00
Gary Qian
f1a7448f44 Properly implement line spacing.
Change-Id: I2f7f7768fc9d6332873f27dce6e058b354b0330d
2017-06-21 12:17:44 -07:00
Gary Qian
b4c8d2c134 Add support for Decoration Styles, remove usage of separate decoration records.
Change-Id: I8fe929b0814b22e37e1517a7ddafb70a1c6b3d37
2017-06-21 10:05:27 -07:00
Gary Qian
3f5ae2f4a3 Add support for underline, overline, and strikethrough.
Change-Id: Id98ecb8409be69d9de44dc931ed6143163469c27
2017-06-20 16:51:44 -07:00
Ankur Mittal
197827c35c Remove deps on gtest from static lib rule
Change-Id: Iae0c4370ad0c7c3194209b7784797e81ee5f6825
2017-06-19 15:55:35 -07:00
Gary Qian
23cc989a35 Add preliminary support for letter-spacing and word-spacing
Change-Id: If3f64cf0c18ff0aa087091626532bcd983f6b54c
2017-06-19 11:33:15 -07:00
Gary Qian
6baa479ed0 Respect letter spacing and word spacing. Remove ParagraphConstraint.
Change-Id: Ie833eab67b50be40b7ea38f9c82577cb46e0e1a7
2017-06-16 17:32:26 -07:00
Gary Qian
1493b676ff Add Getters for intrinsic widths and implement MaxInstrinsicWidth. Update tests.
Change-Id: I210fac9d47f55f8317ca77bca64cfcfd438a246a
2017-06-16 12:13:47 -07:00
Gary Qian
4823485245 Restructure Building of tests and FontCollection
Change-Id: Ifd7d9cd505b119684ccb42c998204d41ee7ef93e
2017-06-15 12:17:29 -07:00
Gary Qian
94900efe1d Now supporting initial integration with Flutter.
Change-Id: Id71461bd96e08eae0e24ab35a040874d960af8e0
2017-06-13 17:09:43 -07:00
Gary Qian
56e4048b17 Fix Minikin to allow proper compilation in Hyphenator.
Change-Id: I2aeb3d5e494ce941dcc8baec2f0bacd15c163094
2017-06-09 12:27:25 -07:00
Gary Qian
ef3b6d0b6e Restructure Building and new features for Flutter support.
Change-Id: Ia0454fabcd89806cfb0e07148696e9ae66c351b6
2017-06-09 12:27:25 -07:00
Gary Qian
cf223546c4 Add TextStyle properties to better support Flutter API
Change-Id: I13174dafa497328c80aada02fe144bd1b3d7f396
2017-06-08 15:38:46 -07:00
Gary Qian
d86d3c526a Add more testing for Paragraph and FontCollection.
Change-Id: Idec0077f44225f0af8bbcd6464d226555f79beae
2017-06-07 15:09:27 -07:00
Gary Qian
4e5639d921 Add additional test framework and tests for Italics. Overloaded paragraph text entry methods.
Change-Id: I0ae9abd6130edd276b1144a0092e03e47373427d
2017-06-07 13:55:28 -07:00
Gary Qian
75752cc8d2 Support for 'fake bold' text and additional tests
Change-Id: Ic9863052365316ea188fcf79b15378be90f440f6
2017-06-06 16:23:59 -07:00
Gary Qian
22345d608e Add fonts to Paragraph and additional tests.
Change-Id: I023cc9bc413975dabc770f6b59d4ffd1fc842ab2
2017-06-05 18:13:01 -07:00
Gary Qian
63bc51106c Add command line option to supply --font-directory=<dir>
Change-Id: If3036a32a82249c9c95d2c5722bdb5ab097c20a1
2017-06-05 15:22:07 -07:00
Chinmay Garde
79f20a8886 Update libTXT sources and tests from initial prototype.
This separates libTXT tests and Minikin tests and accounts for building
with an older version of ICU. Once ICU has been updated, the workarounds
for emoji handling will be removed.

Change-Id: Ic184e653a2561629b01f98aeb4f6fb88aebbfa88
2017-06-02 14:45:16 -07:00
Adam Barth
2697ab61cb Add example program from prototype
Change-Id: Ia6f6c442db57abe484a3efe33ecbc7553743bbb3
2017-05-11 09:38:03 -07:00
Adam Barth
cdbb8b0c9d Add Paragraph class from prototype
Change-Id: Id38e4261c4d6f8fa99f405d9b21bdd9e259a9384
2017-05-11 09:25:35 -07:00
Adam Barth
966ef0ace4 Import more code from the prototype
Change-Id: Ic5656c3ffcc3c3da8ed1fb4a44355b16c21c2f1e
2017-05-11 09:13:07 -07:00
Adam Barth
ef1a552f3c Remove libxml2 dependency 2017-05-10 20:58:52 -07:00
Adam Barth
a02c2f97e6 Add SkFontMgr backend for FontCollection
Change-Id: Ic58127bb696f87254633b01706c26c4ae862f9be
2017-05-10 11:52:41 -07:00
Adam Barth
a2baa5149f Disable failing tests
After this CL, txt_unittests run and pass.

Change-Id: Ia3fbb8f4a68bd09c6b7484edd3a8cae3e95b45ab
2017-05-10 09:02:18 -07:00
Adam Barth
878c4a2586 Build txt_unittests
Many of these fail because they assume they're being executed on Android, but
at least they build.

Change-Id: I5d86e3d2632a0d6fa4219d3f5182f2683c9dd314
2017-05-08 12:40:16 -07:00
Adam Barth
ebc9d58082 Add BUILD.gn and make the library build
Change-Id: Ie2c3d6f97987e8a9938af8f02b093bb74dd22a18
2017-05-08 12:17:19 -07:00
Colin Cross
a74d50d3bb Convert frameworks/minikin/tests to Android.bp am: d9ff3a7289 am: 03e0ceaa4e am: 8f1cbebdf3 -s ours
am: c58d6a379b

Change-Id: Iae1a33dd72a84addda69b7143ceab58cffdb588b
2017-05-04 15:26:40 +00:00
Colin Cross
355450f1f4 Convert frameworks/minikin/tests to Android.bp
am: ede222c03b  -s ours

Change-Id: I2f6b99043828bb6757836fe66ce7822cf28320a1
2017-05-04 15:26:25 +00:00
Colin Cross
c58d6a379b Convert frameworks/minikin/tests to Android.bp am: d9ff3a7289 am: 03e0ceaa4e
am: 8f1cbebdf3  -s ours

Change-Id: Ibb26e4f858efc8314b46f4c67b75013b4e098fc2
2017-05-04 15:24:32 +00:00
Colin Cross
ede222c03b Convert frameworks/minikin/tests to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I930debdd129da7f61ac4b764980f73dfd487785d
Merged-In: I930debdd129da7f61ac4b764980f73dfd487785d
(cherry picked from commit fa994b25d1)
2017-05-04 08:14:50 -07:00