Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5ab29c9

Browse files
authored
[web] Move unicode properties to third_party (#37440)
* [web] Move unicode properties to third_party * license * fix license check * attempt to fix license golden * more license fixes * even more license fixes * add check mode and readme file * fix licenses + add web_unicode.dart * build web_unicode as an sdk library * remove unnecessary variable * minor fix in license golden * tool signature
1 parent 256dc78 commit 5ab29c9

23 files changed

+5331
-287
lines changed

ci/licenses.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function verify_licenses() (
121121

122122
local actualLicenseCount
123123
actualLicenseCount="$(tail -n 1 flutter/ci/licenses_golden/licenses_flutter | tr -dc '0-9')"
124-
local expectedLicenseCount=16 # When changing this number: Update the error message below as well describing all expected license types.
124+
local expectedLicenseCount=17 # When changing this number: Update the error message below as well describing all expected license types.
125125

126126
if [[ $actualLicenseCount -ne $expectedLicenseCount ]]; then
127127
echo "=============================== ERROR ==============================="

ci/licenses_golden/licenses_flutter

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ LIBRARY: accessibility
613613
LIBRARY: engine
614614
LIBRARY: tonic
615615
LIBRARY: txt
616+
LIBRARY: web_unicode
616617
ORIGIN: ../../../flutter/LICENSE
617618
TYPE: LicenseType.bsd
618619
FILE: ../../../flutter/.clang-tidy
@@ -2001,7 +2002,6 @@ FILE: ../../../flutter/lib/web_ui/lib/text.dart
20012002
FILE: ../../../flutter/lib/web_ui/lib/tile_mode.dart
20022003
FILE: ../../../flutter/lib/web_ui/lib/ui.dart
20032004
FILE: ../../../flutter/lib/web_ui/lib/window.dart
2004-
FILE: ../../../flutter/lib/web_ui/tool/unicode_sync_script.dart
20052005
FILE: ../../../flutter/runtime/dart_isolate.cc
20062006
FILE: ../../../flutter/runtime/dart_isolate.h
20072007
FILE: ../../../flutter/runtime/dart_isolate_group_data.cc
@@ -3286,6 +3286,8 @@ FILE: ../../../flutter/third_party/txt/src/txt/platform_fuchsia.cc
32863286
FILE: ../../../flutter/third_party/txt/src/txt/platform_linux.cc
32873287
FILE: ../../../flutter/third_party/txt/src/txt/platform_mac.mm
32883288
FILE: ../../../flutter/third_party/txt/src/txt/platform_windows.cc
3289+
FILE: ../../../flutter/third_party/web_unicode/lib/web_unicode.dart
3290+
FILE: ../../../flutter/third_party/web_unicode/tool/unicode_sync_script.dart
32893291
FILE: ../../../flutter/vulkan/procs/vulkan_handle.cc
32903292
FILE: ../../../flutter/vulkan/procs/vulkan_handle.h
32913293
FILE: ../../../flutter/vulkan/procs/vulkan_interface.cc
@@ -3704,4 +3706,59 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37043706
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37053707
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37063708
====================================================================================================
3707-
Total license count: 16
3709+
3710+
====================================================================================================
3711+
LIBRARY: web_unicode
3712+
ORIGIN: ../../../flutter/third_party/web_unicode/LICENSE
3713+
TYPE: LicenseType.unknown
3714+
FILE: ../../../flutter/third_party/web_unicode/lib/web_unicode/codegen/line_break_properties.dart
3715+
FILE: ../../../flutter/third_party/web_unicode/lib/web_unicode/codegen/word_break_properties.dart
3716+
----------------------------------------------------------------------------------------------------
3717+
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
3718+
3719+
See Terms of Use <https://www.unicode.org/copyright.html>
3720+
for definitions of Unicode Inc.’s Data Files and Software.
3721+
3722+
NOTICE TO USER: Carefully read the following legal agreement.
3723+
BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
3724+
DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
3725+
YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
3726+
TERMS AND CONDITIONS OF THIS AGREEMENT.
3727+
IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
3728+
THE DATA FILES OR SOFTWARE.
3729+
3730+
COPYRIGHT AND PERMISSION NOTICE
3731+
3732+
Copyright © 1991-2022 Unicode, Inc. All rights reserved.
3733+
Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
3734+
3735+
Permission is hereby granted, free of charge, to any person obtaining
3736+
a copy of the Unicode data files and any associated documentation
3737+
(the "Data Files") or Unicode software and any associated documentation
3738+
(the "Software") to deal in the Data Files or Software
3739+
without restriction, including without limitation the rights to use,
3740+
copy, modify, merge, publish, distribute, and/or sell copies of
3741+
the Data Files or Software, and to permit persons to whom the Data Files
3742+
or Software are furnished to do so, provided that either
3743+
(a) this copyright and permission notice appear with all copies
3744+
of the Data Files or Software, or
3745+
(b) this copyright and permission notice appear in associated
3746+
Documentation.
3747+
3748+
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
3749+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
3750+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3751+
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
3752+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
3753+
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
3754+
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
3755+
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
3756+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3757+
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
3758+
3759+
Except as contained in this notice, the name of a copyright holder
3760+
shall not be used in advertising or otherwise to promote the sale,
3761+
use or other dealings in these Data Files or Software without prior
3762+
written authorization of the copyright holder.
3763+
====================================================================================================
3764+
Total license count: 17

ci/licenses_golden/tool_signature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Signature: 9081858dc189235efdea91ba5c55b432
1+
Signature: 027af91b165acaa447651bfca8c7c704
22

lib/web_ui/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,3 +339,7 @@ Once you know the version for the Emscripten SDK, change the line in
339339
[4]: https://chrome-infra-packages.appspot.com/p/flutter_internal
340340
[5]: https://cs.opensource.google/flutter/recipes/+/master:recipes/engine/web_engine.py
341341
[6]: https://chromium.googlesource.com/chromium/src.git/+/main/docs/cipd_and_3pp.md#What-is-CIPD
342+
343+
## Unicode properties
344+
345+
We pull the unicode properties we need from `third_party/web_unicode`. See `third_party/web_unicode/README.md` for more details on how we generate Dart code from unicode properties.

lib/web_ui/dev/licenses.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class LicensesCommand extends Command<bool> {
3535
'lib',
3636
'test',
3737
'dev',
38-
'tool'
3938
]) {
4039
final String expectedAbsoluteDirectory =
4140
path.join(environment.webUiRootDir.path, expectedDirectory);

lib/web_ui/lib/src/engine/text/line_break_properties.dart

Lines changed: 5 additions & 61 deletions
Large diffs are not rendered by default.

lib/web_ui/lib/src/engine/text/word_break_properties.dart

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,17 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// AUTO-GENERATED FILE.
6-
// Generated by: tool/unicode_sync_script.dart
7-
//
8-
// Source:
9-
// # WordBreakProperty-13.0.0.txt
10-
// # Date: 2020-01-22, 00:07:44 GMT
11-
// # © 2020 Unicode®, Inc.
12-
// # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
13-
// # For terms of use, see http://www.unicode.org/terms_of_use.html
5+
import 'package:web_unicode/web_unicode.dart';
146

157
import 'unicode_range.dart';
168

17-
/// For an explanation of these enum values, see:
18-
///
19-
/// * http://unicode.org/reports/tr29/#Table_Word_Break_Property_Values
20-
enum WordCharProperty {
21-
DoubleQuote, // serialized as "A"
22-
SingleQuote, // serialized as "B"
23-
HebrewLetter, // serialized as "C"
24-
CR, // serialized as "D"
25-
LF, // serialized as "E"
26-
Newline, // serialized as "F"
27-
Extend, // serialized as "G"
28-
RegionalIndicator, // serialized as "H"
29-
Format, // serialized as "I"
30-
Katakana, // serialized as "J"
31-
ALetter, // serialized as "K"
32-
MidLetter, // serialized as "L"
33-
MidNum, // serialized as "M"
34-
MidNumLet, // serialized as "N"
35-
Numeric, // serialized as "O"
36-
ExtendNumLet, // serialized as "P"
37-
ZWJ, // serialized as "Q"
38-
WSegSpace, // serialized as "R"
39-
Unknown, // serialized as "S"
40-
}
41-
42-
const String _packedWordBreakProperties =
43-
'000a!E000b000cF000d!D000w!R000y!A0013!B0018!M001a!N001c001lO001m!L001n!M001t002iK002n!P002p003eK003p!F004q!K004t!I0051!K0053!L0056!K005c005yK0060006uK006w00k7K00ke00lbK00lc00ofG00og00okK00om00onK00oq00otK00ou!M00ov!K00p2!K00p3!L00p400p6K00p8!K00pa00ptK00pv00s5K00s700w1K00w300w9G00wa010vK010x011yK01210124K0126!K0127!L0128013cK013d!M013e!K013l014tG014v!G014x014yG01500151G0153!G015c0162C0167016aC016b!K016c!L016o016tI01700171M0174017eG017g!I017k018qK018r019bG019c019lO019n!O019o!M019q019rK019s!G019t01cjK01cl!K01cm01csG01ct!I01cv01d0G01d101d2K01d301d4G01d601d9G01da01dbK01dc01dlO01dm01doK01dr!K01e7!I01e8!K01e9!G01ea01f3K01f401fuG01fx01idK01ie01ioG01ip!K01j401jdO01je01kaK01kb01kjG01kk01klK01ko!M01kq!K01kt!G01kw01lhK01li01llG01lm!K01ln01lvG01lw!K01lx01lzG01m0!K01m101m5G01mo01ncK01nd01nfG01nk01nuK01pc01pwK01py01qfK01qr01r5G01r6!I01r701s3G01s401tlK01tm01toG01tp!K01tq01u7G01u8!K01u901ufG01ug01upK01uq01urG01uu01v3O01v501vkK01vl01vnG01vp01vwK01vz01w0K01w301woK01wq01wwK01wy!K01x201x5K01x8!G01x9!K01xa01xgG01xj01xkG01xn01xpG01xq!K01xz!G01y401y5K01y701y9K01ya01ybG01ye01ynO01yo01ypK01z0!K01z2!G01z501z7G01z901zeK01zj01zkK01zn0208K020a020gK020i020jK020l020mK020o020pK020s!G020u020yG02130214G02170219G021d!G021l021oK021q!K021y0227O02280229G022a022cK022d!G022p022rG022t0231K02330235K0237023sK023u0240K02420243K02450249K024c!G024d!K024e024lG024n024pG024r024tG024w!K025c025dK025e025fG025i025rO0261!K02620267G0269026bG026d026kK026n026oK026r027cK027e027kK027m027nK027p027tK027w!G027x!K027y0284G02870288G028b028dG028l028nG028s028tK028v028xK028y028zG0292029bO029d!K029u!G029v!K029x02a2K02a602a8K02aa02adK02ah02aiK02ak!K02am02anK02ar02asK02aw02ayK02b202bdK02bi02bmG02bq02bsG02bu02bxG02c0!K02c7!G02cm02cvO02dc02dgG02dh02doK02dq02dsK02du02egK02ei02exK02f1!K02f202f8G02fa02fcG02fe02fhG02fp02fqG02fs02fuK02g002g1K02g202g3G02g602gfO02gw!K02gx02gzG02h102h8K02ha02hcK02he02i0K02i202ibK02id02ihK02ik!G02il!K02im02isG02iu02iwG02iy02j1G02j902jaG02ji!K02jk02jlK02jm02jnG02jq02jzO02k102k2K02kg02kjG02kk02ksK02ku02kwK02ky02m2K02m302m4G02m5!K02m602mcG02me02mgG02mi02mlG02mm!K02ms02muK02mv!G02n302n5K02n602n7G02na02njO02nu02nzK02o102o3G02o502omK02oq02pdK02pf02pnK02pp!K02ps02pyK02q2!G02q702qcG02qe!G02qg02qnG02qu02r3O02r602r7G02sx!G02t002t6G02tj02tqG02ts02u1O02wh!G02wk02wsG02x402x9G02xc02xlO02yo!K02zc02zdG02zk02ztO0305!G0307!G0309!G030e030fG030g030nK030p031oK031t032cG032e032fG032g032kK032l032vG032x033wG0346!G036z037iG037k037tO03860389G038e038gG038i038kG038n038tG038x0390G039e039pG039r!G039s03a1O03a203a5G03a803b9K03bb!K03bh!K03bk03cqK03cs03m0K03m203m5K03m803meK03mg!K03mi03mlK03mo03nsK03nu03nxK03o003owK03oy03p1K03p403paK03pc!K03pe03phK03pk03pyK03q003rkK03rm03rpK03rs03tmK03tp03trG03uo03v3K03vk03xxK03y003y5K03y904fgK04fj04fzK04g0!R04g104gqK04gw04iyK04j204jcK04jk04jwK04jy04k1K04k204k4G04kg04kxK04ky04l0G04lc04ltK04lu04lvG04m804mkK04mm04moK04mq04mrG04ok04pfG04pp!G04ps04q1O04qz04r1G04r2!I04r404rdO04rk04u0K04u804ucK04ud04ueG04uf04vcK04vd!G04ve!K04vk04xhK04xs04ymK04yo04yzG04z404zfG04zq04zzO053k053tO054w055iK055j055nG0579057iG057k058cG058f!G058g058pO058w0595O059s05a8G05c005c4G05c505dfK05dg05dwG05dx05e3K05e805ehO05ez05f7G05fk05fmG05fn05ggK05gh05gtG05gu05gvK05gw05h5O05h605idK05ie05irG05j405k3K05k405knG05kw05l5O05l905lbK05lc05llO05lm05mlK05mo05mwK05n405oaK05od05ofK05ow05oyG05p005pkG05pl05poK05pp!G05pq05pvK05pw!G05px05pyK05pz05q1G05q2!K05q805vjK05vk05x5G05x705xbG05xc0651K06540659K065c066dK066g066lK066o066vK066x!K066z!K0671!K0673067xK0680069gK069i069oK069q!K069u069wK069y06a4K06a806abK06ae06ajK06ao06b0K06b606b8K06ba06bgK06bk06bqR06bs06buR06bw!G06bx!Q06by06bzI06c806c9N06ck!N06cn!L06co06cpF06cq06cuI06cv!P06db06dcP06dg!M06dw!P06e7!R06e806ecI06ee06enI06ep!K06f3!K06fk06fwK06hc06i8G06iq!K06iv!K06iy06j7K06j9!K06jd06jhK06jo!K06jq!K06js!K06ju06jxK06jz06k9K06kc06kfK06kl06kpK06ku!K06lc06mgK079207ahK08ow08q6K08q808riK08rk08v8K08vf08viK08vj08vlG08vm08vnK08w008x1K08x3!K08x9!K08xc08yvK08z3!K08zj!G08zk0906K090g090mK090o090uK090w0912K0914091aK091c091iK091k091qK091s091yK09200926K09280933G094f!K09hc!R09hh!K09ii09inG09ip09itJ09iz09j0K09ll09lmG09ln09loJ09ls09oaJ09oc09ofJ09ol09prK09pt09seK09sw09trK09v409vjJ0a1c0a2mJ0a2o0a53J0vls0wi4K0wk00wl9K0wlc0wssK0wsw0wtbK0wtc0wtlO0wtm0wtnK0wu80wviK0wvj0wvmG0wvo0wvxG0wvz0wwtK0wwu0wwvG0www0wz3K0wz40wz5G0wzs0x4vK0x4y0x56K0x6d0x6pK0x6q!G0x6r0x6tK0x6u!G0x6v0x6yK0x6z!G0x700x7mK0x7n0x7rG0x7w!G0x8g0x9vK0xa80xa9G0xaa0xbnK0xbo0xc5G0xcg0xcpO0xcw0xddG0xde0xdjK0xdn!K0xdp0xdqK0xdr!G0xds0xe1O0xe20xetK0xeu0xf1G0xf40xfqK0xfr0xg3G0xgg0xh8K0xhc0xhfG0xhg0xiqK0xir0xj4G0xjj!K0xjk0xjtO0xk5!G0xkg0xkpO0xkw0xm0K0xm10xmeG0xmo0xmqK0xmr!G0xms0xmzK0xn00xn1G0xn40xndO0xob0xodG0xps!G0xpu0xpwG0xpz0xq0G0xq60xq7G0xq9!G0xr40xreK0xrf0xrjG0xrm0xroK0xrp0xrqG0xs10xs6K0xs90xseK0xsh0xsmK0xsw0xt2K0xt40xtaK0xtc0xuxK0xv40xyaK0xyb0xyiG0xyk0xylG0xyo0xyxO0xz416lfK16ls16meK16mj16nvK1dkw1dl2K1dlf1dljK1dlp!C1dlq!G1dlr1dm0C1dm21dmeC1dmg1dmkC1dmm!C1dmo1dmpC1dmr1dmsC1dmu1dn3C1dn41dptK1dqr1e0tK1e1c1e33K1e361e4nK1e5s1e63K1e681e6nG1e6o!M1e6r!L1e6s!M1e741e7jG1e7n1e7oP1e8d1e8fP1e8g!M1e8i!N1e8k!M1e8l!L1e9c1e9gK1e9i1ed8K1edb!I1edj!N1edo!M1edq!N1eds1ee1O1ee2!L1ee3!M1ee91eeyK1ef3!P1ef51efuK1eg61ehpJ1ehq1ehrG1ehs1eimK1eiq1eivK1eiy1ej3K1ej61ejbK1eje1ejgK1ek91ekbI1ekg1ekrK1ekt1eliK1elk1em2K1em41em5K1em71emlK1emo1en1K1eo01ereK1etc1eusK1eyl!G1f281f30K1f341f4gK1f4w!G1f5s1f6nK1f711f7uK1f801f91K1f921f96G1f9c1fa5K1fa81fb7K1fbc1fbjK1fbl1fbpK1fcw1fh9K1fhc1fhlO1fhs1firK1fiw1fjvK1fk01fl3K1flc1fmrK1fr41fzqK1g001g0lK1g0w1g13K1g5c1g5hK1g5k!K1g5m1g6tK1g6v1g6wK1g70!K1g731g7pK1g801g8mK1g8w1g9qK1gbk1gc2K1gc41gc5K1gcg1gd1K1gdc1ge1K1gg01ghjK1ghq1ghrK1gjk!K1gjl1gjnG1gjp1gjqG1gjw1gjzG1gk01gk3K1gk51gk7K1gk91gl1K1gl41gl6G1glb!G1gm81gn0K1gn41gnwK1gow1gp3K1gp51gpwK1gpx1gpyG1gqo1gs5K1gsg1gt1K1gtc1gtuK1gu81gupK1gxs1gzsK1h1c1h2qK1h341h4iK1h4w1h5vK1h5w1h5zG1h681h6hO1hfk1hgpK1hgr1hgsG1hgw1hgxK1hj41hjwK1hk7!K1hkg1hl1K1hl21hlcG1ho01hokK1hpc1hpyK1hq81hqaG1hqb1hrrK1hrs1hs6G1ht21htbO1htr1htuG1htv1hv3K1hv41hveG1hvh!I1hvx!I1hw01hwoK1hww1hx5O1hxc1hxeG1hxf1hyeK1hyf1hysG1hyu1hz3O1hz8!K1hz91hzaG1hzb!K1hzk1i0iK1i0j!G1i0m!K1i0w1i0yG1i0z1i2aK1i2b1i2oG1i2p1i2sK1i2x1i30G1i321i33G1i341i3dO1i3e!K1i3g!K1i4g1i4xK1i4z1i5nK1i5o1i5zG1i66!G1i801i86K1i88!K1i8a1i8dK1i8f1i8tK1i8v1i94K1i9c1iamK1ian1iayG1ib41ibdO1ibk1ibnG1ibp1ibwK1ibz1ic0K1ic31icoK1icq1icwK1icy1iczK1id11id5K1id71id8G1id9!K1ida1idgG1idj1idkG1idn1idpG1ids!K1idz!G1ie51ie9K1iea1iebG1iee1iekG1ieo1iesG1iio1ik4K1ik51ikmG1ikn1ikqK1ikw1il5O1ila!G1ilb1ildK1im81injK1ink1io3G1io41io5K1io7!K1iog1iopO1itc1iumK1iun1iutG1iuw1iv4G1ivs1ivvK1ivw1ivxG1iww1iy7K1iy81iyoG1iys!K1iz41izdO1j0g1j1mK1j1n1j1zG1j20!K1j281j2hO1j4t1j57G1j5c1j5lO1jb41jcbK1jcc1jcqG1jfk1jhbK1jhc1jhlO1ji71jieK1jih!K1jik1jirK1jit1jiuK1jiw1jjjK1jjk1jjpG1jjr1jjsG1jjv1jjyG1jjz!K1jk0!G1jk1!K1jk21jk3G1jkg1jkpO1jmo1jmvK1jmy1jo0K1jo11jo7G1joa1jogG1joh!K1joj!K1jok!G1jpc!K1jpd1jpmG1jpn1jqqK1jqr1jqxG1jqy!K1jqz1jr2G1jrb!G1jrk!K1jrl1jrvG1jrw1jt5K1jt61jtlG1jtp!K1juo1jw8K1k3k1k3sK1k3u1k4uK1k4v1k52G1k541k5bG1k5c!K1k5s1k61O1k6q1k7jK1k7m1k87G1k891k8mG1kao1kauK1kaw1kaxK1kaz1kc0K1kc11kc6G1kca!G1kcc1kcdG1kcf1kclG1kcm!K1kcn!G1kcw1kd5O1kdc1kdhK1kdj1kdkK1kdm1kehK1kei1kemG1keo1kepG1ker1kevG1kew!K1kf41kfdO1ko01koiK1koj1komG1kts!K1kw01lllK1log1lriK1ls01lxfK1o1s1oviK1ovk1ovsI1s001sg6K1z401zjsK1zk01zkuK1zkw1zl5O1zo01zotK1zow1zp0G1zpc1zqnK1zqo1zquG1zr41zr7K1zrk1zrtO1zs31zsnK1zst1ztbK20cg20e7K20hs20juK20jz!G20k0!K20k120ljG20lr20luG20lv20m7K20o020o1K20o3!K20o4!G20og20ohG2dc0!J2dlw2dlzJ2fpc2fsaK2fsg2fssK2fsw2ft4K2ftc2ftlK2ftp2ftqG2fts2ftvI2jxh2jxlG2jxp2jxuG2jxv2jy2I2jy32jyaG2jyd2jyjG2jze2jzhG2k3m2k3oG2kg02kicK2kie2kkcK2kke2kkfK2kki!K2kkl2kkmK2kkp2kksK2kku2kl5K2kl7!K2kl92klfK2klh2kn9K2knb2kneK2knh2knoK2knq2knwK2kny2kopK2kor2kouK2kow2kp0K2kp2!K2kp62kpcK2kpe2kytK2kyw2kzkK2kzm2l0aK2l0c2l16K2l182l1wK2l1y2l2sK2l2u2l3iK2l3k2l4eK2l4g2l54K2l562l60K2l622l6qK2l6s2l6zK2l722l8fO2lmo2lo6G2lob2lpoG2lpx!G2lqc!G2lqz2lr3G2lr52lrjG2mtc2mtiG2mtk2mu0G2mu32mu9G2mub2mucG2mue2muiG2n0g2n1oK2n1s2n1yG2n1z2n25K2n282n2hO2n2m!K2ncw2ne3K2ne42ne7G2ne82nehO2oe82ojoK2ok02ok6G2olc2on7K2on82oneG2onf!K2onk2ontO2pkw2pkzK2pl12plrK2plt2pluK2plw!K2plz!K2pm12pmaK2pmc2pmfK2pmh!K2pmj!K2pmq!K2pmv!K2pmx!K2pmz!K2pn12pn3K2pn52pn6K2pn8!K2pnb!K2pnd!K2pnf!K2pnh!K2pnj!K2pnl2pnmK2pno!K2pnr2pnuK2pnw2po2K2po42po7K2po92pocK2poe!K2pog2popK2por2pp7K2ppd2ppfK2pph2pplK2ppn2pq3K2q7k2q89K2q8g2q95K2q9c2qa1K2qcm2qdbH2qrf2qrjG2sc02sc9Ojny9!Ijnz4jo1rGjo5cjobzG';
9+
export 'package:web_unicode/web_unicode.dart' show WordCharProperty;
4410

4511

4612
UnicodePropertyLookup<WordCharProperty> wordLookup =
4713
UnicodePropertyLookup<WordCharProperty>.fromPackedData(
48-
_packedWordBreakProperties,
49-
231,
14+
packedWordBreakProperties,
15+
singleWordBreakRangesCount,
5016
WordCharProperty.values,
51-
WordCharProperty.Unknown,
17+
defaultWordCharProperty,
5218
);

lib/web_ui/pubspec.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ dependencies:
99
js: 0.6.4
1010
meta: ^1.7.0
1111

12+
web_unicode:
13+
path: ../../third_party/web_unicode
14+
1215
dev_dependencies:
1316
archive: 3.1.2
1417
args: any

third_party/web_unicode/LICENSE

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
2+
3+
See Terms of Use <https://www.unicode.org/copyright.html>
4+
for definitions of Unicode Inc.’s Data Files and Software.
5+
6+
NOTICE TO USER: Carefully read the following legal agreement.
7+
BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
8+
DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
9+
YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
10+
TERMS AND CONDITIONS OF THIS AGREEMENT.
11+
IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
12+
THE DATA FILES OR SOFTWARE.
13+
14+
COPYRIGHT AND PERMISSION NOTICE
15+
16+
Copyright © 1991-2022 Unicode, Inc. All rights reserved.
17+
Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
18+
19+
Permission is hereby granted, free of charge, to any person obtaining
20+
a copy of the Unicode data files and any associated documentation
21+
(the "Data Files") or Unicode software and any associated documentation
22+
(the "Software") to deal in the Data Files or Software
23+
without restriction, including without limitation the rights to use,
24+
copy, modify, merge, publish, distribute, and/or sell copies of
25+
the Data Files or Software, and to permit persons to whom the Data Files
26+
or Software are furnished to do so, provided that either
27+
(a) this copyright and permission notice appear with all copies
28+
of the Data Files or Software, or
29+
(b) this copyright and permission notice appear in associated
30+
Documentation.
31+
32+
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
33+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
34+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35+
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
36+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
37+
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
38+
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
39+
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
40+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
41+
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
42+
43+
Except as contained in this notice, the name of a copyright holder
44+
shall not be used in advertising or otherwise to promote the sale,
45+
use or other dealings in these Data Files or Software without prior
46+
written authorization of the copyright holder.

third_party/web_unicode/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Usage ##
2+
3+
To generate code for line/word break properties, follow these steps:
4+
5+
### 1. **<u>Download the unicode files:</u>**
6+
7+
The properties files can be found on the unicode.org website, for example [LineBreak.txt](https://www.unicode.org/Public/13.0.0/ucd/LineBreak.txt) and [WordBreakProperty.txt](https://www.unicode.org/Public/13.0.0/ucd/auxiliary/WordBreakProperty.txt). The codegen script expects the files to be located at `third_party/web_unicode/properties/`.
8+
9+
### 2. **<u>Run the codegen script:</u>**
10+
11+
Inside the `third_party/web_unicode` directory:
12+
```
13+
dart tool/unicode_sync_script.dart
14+
```
15+
16+
## Check Mode ##
17+
18+
If you don't want to generate code, but you want to make sure that the properties files and the codegen files are still in sync, you can run the codegen script in "check mode".
19+
20+
Inside the `third_party/web_unicode` directory:
21+
```
22+
dart tool/unicode_sync_script.dart --check
23+
```
24+
25+
This command won't overwite the existing codegen files. It only checks whether they are still in sync with the properties files or not. If not, it exits with a non-zero exit code.

0 commit comments

Comments
 (0)