diff --git a/Cargo.lock b/Cargo.lock index 6f4f5de7422..1eeb429de37 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -547,7 +547,7 @@ dependencies = [ "fnv", "font-kit", "gfx", - "gleam 0.11.0", + "gleam 0.12.1", "half", "ipc-channel", "log", @@ -728,9 +728,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c84c596dcf125d6781f58e3f4254677ec2a6d8aa56e8501ac277100990b3229" +checksum = "0e56268c17a6248366d66d4a47a3381369d068cce8409bb1716ed77ea32163bb" dependencies = [ "cc", ] @@ -823,7 +823,7 @@ dependencies = [ "embedder_traits", "euclid", "gfx_traits", - "gleam 0.11.0", + "gleam 0.12.1", "image", "ipc-channel", "keyboard-types", @@ -996,6 +996,19 @@ dependencies = [ "libc", ] +[[package]] +name = "core-graphics" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6082396a349fa49674ba1bda4077332a18bf150e8fa75745ece07085e29a113" +dependencies = [ + "bitflags", + "core-foundation 0.9.0", + "core-graphics-types", + "foreign-types", + "libc", +] + [[package]] name = "core-graphics-types" version = "0.1.0" @@ -1010,24 +1023,12 @@ dependencies = [ [[package]] name = "core-text" -version = "13.3.2" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db84654ad95211c082cf9795f6f83dc17d0ae6c985ac1b906369dc7384ed346d" +checksum = "04dfae50af11e72657fe7174cddb1ecddc5398037f7f6f39533ad69207c9a4e2" dependencies = [ - "core-foundation 0.6.4", - "core-graphics 0.17.3", - "foreign-types", - "libc", -] - -[[package]] -name = "core-text" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131b3fd1f8bd5db9f2b398fa4fdb6008c64afc04d447c306ac2c7e98fba2a61d" -dependencies = [ - "core-foundation 0.7.0", - "core-graphics 0.19.0", + "core-foundation 0.9.0", + "core-graphics 0.22.0", "foreign-types", "libc", ] @@ -1217,16 +1218,6 @@ dependencies = [ "libdbus-sys", ] -[[package]] -name = "deflate" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707b6a7b384888a70c8d2e8650b3e60170dfc6a67bb4aa67b6dfca57af4bedb4" -dependencies = [ - "adler32", - "byteorder", -] - [[package]] name = "deflate" version = "0.8.6" @@ -1596,15 +1587,15 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "font-kit" -version = "0.7.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ab2cdc792b545c49acb23aafa1cdc9381ea96140741f10bac596fd1bd1aa4f" +checksum = "1f9042cb45150fb2b2a012fc03d0f1d2071f18e90397b9d2a5ec8ade8464bf20" dependencies = [ "bitflags", "byteorder", - "core-foundation 0.7.0", - "core-graphics 0.19.0", - "core-text 15.0.0", + "core-foundation 0.9.0", + "core-graphics 0.22.0", + "core-text", "dirs", "dwrote", "float-ord", @@ -1646,12 +1637,23 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "freetype" -version = "0.4.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11926b2b410b469d0e9399eca4cbbe237a9ef02176c485803b29216307e8e028" +checksum = "bee38378a9e3db1cc693b4f88d166ae375338a0ff75cb8263e1c601d51f35dc6" dependencies = [ + "freetype-sys", "libc", - "servo-freetype-sys", +] + +[[package]] +name = "freetype-sys" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" +dependencies = [ + "cmake", + "libc", + "pkg-config", ] [[package]] @@ -1872,9 +1874,9 @@ dependencies = [ "app_units", "bitflags", "byteorder", - "core-foundation 0.7.0", - "core-graphics 0.19.0", - "core-text 15.0.0", + "core-foundation 0.9.0", + "core-graphics 0.22.0", + "core-text", "dwrote", "euclid", "fnv", @@ -2103,9 +2105,9 @@ dependencies = [ [[package]] name = "gleam" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a13b5bb12ab457c15400b43cbba5971df5c1898b6a9c30cc8c52cb01baa112" +checksum = "3fdef5b9df6d3a261b80a5ac55e13bf93945725df2463c1b0a2e5a527dce0d37" dependencies = [ "gl_generator 0.14.0", ] @@ -2494,13 +2496,13 @@ checksum = "63d68db75012a85555434ee079e7e6337931f87a087ab2988becbadf64673a7f" [[package]] name = "harfbuzz-sys" -version = "0.3.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d74cab8498b2d15700b694fb38f77562869d05e1f8b602dd05221a1ca2d63" +checksum = "bf8c27ca13930dc4ffe474880040fe9e0f03c2121600dc9c95423624cab3e467" dependencies = [ "cc", - "core-graphics 0.17.3", - "core-text 13.3.2", + "core-graphics 0.22.0", + "core-text", "foreign-types", "freetype", "pkg-config", @@ -2745,7 +2747,7 @@ dependencies = [ "num-iter", "num-rational 0.3.0", "num-traits", - "png 0.16.6", + "png", "scoped_threadpool", "tiff", ] @@ -2771,15 +2773,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "inflate" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" -dependencies = [ - "adler32", -] - [[package]] name = "input_buffer" version = "0.3.1" @@ -3222,7 +3215,7 @@ dependencies = [ "gaol", "gfx", "gfx_traits", - "gleam 0.11.0", + "gleam 0.12.1", "gstreamer", "ipc-channel", "keyboard-types", @@ -4212,7 +4205,7 @@ dependencies = [ [[package]] name = "peek-poke" version = "0.2.0" -source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#920168aff79a7cf52980b0c90965a591f2f4204a" dependencies = [ "euclid", "peek-poke-derive", @@ -4221,7 +4214,7 @@ dependencies = [ [[package]] name = "peek-poke-derive" version = "0.2.1" -source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#920168aff79a7cf52980b0c90965a591f2f4204a" dependencies = [ "proc-macro2 1.0.17", "quote 1.0.2", @@ -4366,18 +4359,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "png" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef859a23054bbfee7811284275ae522f0434a3c8e7f4b74bd4a35ae7e1c4a283" -dependencies = [ - "bitflags", - "crc32fast", - "deflate 0.7.20", - "inflate", -] - [[package]] name = "png" version = "0.16.6" @@ -4386,7 +4367,7 @@ checksum = "c150bf7479fafe3dd8740dbe48cc33b2a3efb7b0fe3483aced8bbc39f6d0238d" dependencies = [ "bitflags", "crc32fast", - "deflate 0.8.6", + "deflate", "miniz_oxide 0.3.7", ] @@ -4596,15 +4577,14 @@ checksum = "a871f1e45a3a3f0c73fb60343c811238bb5143a81642e27c2ac7aac27ff01a63" [[package]] name = "raqote" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501c19caa439857ed7bea975fa4c3c10ee9a24e33c2640030c3ac14b58f39f77" +version = "0.8.1-alpha.0" +source = "git+https://github.com/jdm/raqote?branch=fkup#ff5d2d1aa7813dbcacb0d028cf7d17c82a35d9d4" dependencies = [ "euclid", "font-kit", "lyon_geom 0.15.0", "pathfinder_geometry", - "png 0.15.3", + "png", "sw-composite", "typed-arena", ] @@ -5160,9 +5140,9 @@ dependencies = [ [[package]] name = "servo-fontconfig" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a088f8d775a5c5314aae09bd77340bc9c67d72b9a45258be34c83548b4814cd9" +checksum = "0b47fef69c52fb55838c756949c60595f0b855daa4e82fc52ad99ff3e03e2c70" dependencies = [ "libc", "servo-fontconfig-sys", @@ -5170,22 +5150,12 @@ dependencies = [ [[package]] name = "servo-fontconfig-sys" -version = "4.0.9" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b3e166450f523f4db06c14f02a2d39e76d49b5d8cbd224338d93e3595c156c" +checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" dependencies = [ "expat-sys", - "pkg-config", - "servo-freetype-sys", -] - -[[package]] -name = "servo-freetype-sys" -version = "4.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4ccb6d0d32d277d3ef7dea86203d8210945eb7a45fba89dd445b3595dd0dfc" -dependencies = [ - "cmake", + "freetype-sys", "pkg-config", ] @@ -6509,12 +6479,9 @@ dependencies = [ [[package]] name = "unicode-script" -version = "0.3.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f03ad95feb4fde244d79985bfd79eb34ff2702fedb441d2ba3f4ff813efd19" -dependencies = [ - "harfbuzz-sys", -] +checksum = "79bf4d5fc96546fdb73f9827097810bbda93b11a6770ff3a54e1f445d4135787" [[package]] name = "unicode-segmentation" @@ -6862,7 +6829,7 @@ dependencies = [ [[package]] name = "webrender" version = "0.61.0" -source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#920168aff79a7cf52980b0c90965a591f2f4204a" dependencies = [ "backtrace", "base64 0.10.1", @@ -6871,15 +6838,15 @@ dependencies = [ "build-parallel", "byteorder", "cfg-if", - "core-foundation 0.7.0", - "core-graphics 0.19.0", - "core-text 15.0.0", + "core-foundation 0.9.0", + "core-graphics 0.22.0", + "core-text", "cstr", "dwrote", "euclid", "freetype", "fxhash", - "gleam 0.11.0", + "gleam 0.12.1", "glslopt", "image", "lazy_static", @@ -6906,13 +6873,13 @@ dependencies = [ [[package]] name = "webrender_api" version = "0.61.0" -source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#920168aff79a7cf52980b0c90965a591f2f4204a" dependencies = [ "app_units", "bitflags", "byteorder", - "core-foundation 0.7.0", - "core-graphics 0.19.0", + "core-foundation 0.9.0", + "core-graphics 0.22.0", "derive_more", "euclid", "malloc_size_of_derive", @@ -6927,7 +6894,7 @@ dependencies = [ [[package]] name = "webrender_build" version = "0.0.1" -source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#920168aff79a7cf52980b0c90965a591f2f4204a" dependencies = [ "bitflags", "lazy_static", @@ -7106,7 +7073,7 @@ dependencies = [ [[package]] name = "wr_malloc_size_of" version = "0.0.1" -source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#34d968adeda2e06b057a13d14a88df5766b38eda" +source = "git+https://github.com/jdm/webrender?branch=crash-backtrace#920168aff79a7cf52980b0c90965a591f2f4204a" dependencies = [ "app_units", "euclid", diff --git a/Cargo.toml b/Cargo.toml index 4dbe63e439c..0ca9b967cc9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,10 @@ mio = { git = "https://github.com/servo/mio.git", branch = "servo-mio-0.6.22" } # https://github.com/rust-lang/backtrace-rs/pull/363/ backtrace = { git = "https://github.com/servo/backtrace-rs", branch = "uwp-fix" } -# https://github.com/servo/servo/issues/27039#issuecomment-654400150 +[patch."https://github.com/jrmuizel/raqote"] +raqote = { git = "https://github.com/jdm/raqote", branch = "fkup" } + +# https://github.com/servo/servo/issues/27515#issuecomment-671474054 [patch."https://github.com/servo/webrender"] webrender = { git = "https://github.com/jdm/webrender", branch = "crash-backtrace" } webrender_api = { git = "https://github.com/jdm/webrender", branch = "crash-backtrace" } diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index b841082918c..f5e9dbcd47a 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -22,10 +22,10 @@ canvas_traits = { path = "../canvas_traits" } crossbeam-channel = "0.4" cssparser = "0.27" euclid = "0.20" -font-kit = "0.7" +font-kit = "0.10" fnv = "1.0" gfx = { path = "../gfx" } -gleam = "0.11" +gleam = "0.12" half = "1" ipc-channel = "0.14" log = "0.4" @@ -33,7 +33,7 @@ lyon_geom = "0.14" num-traits = "0.2" pathfinder_geometry = "0.5" pixels = { path = "../pixels" } -raqote = { version = "0.8", features = ["text"] } +raqote = { git = "https://github.com/jrmuizel/raqote", features = ["text"] } servo_arc = { path = "../servo_arc" } servo_config = { path = "../config" } sparkle = "0.1.25" diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index 0d4fc881921..048344af294 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -21,7 +21,7 @@ crossbeam-channel = "0.4" embedder_traits = { path = "../embedder_traits" } euclid = "0.20" gfx_traits = { path = "../gfx_traits" } -gleam = { version = "0.11", optional = true } +gleam = { version = "0.12", optional = true } image = "0.23" ipc-channel = "0.14" keyboard-types = "0.5" diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 0ffa87835e1..0d96a7ed783 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -20,7 +20,7 @@ euclid = "0.20" fnv = "1.0" fontsan = { git = "https://github.com/servo/fontsan" } gfx_traits = { path = "../gfx_traits" } -harfbuzz-sys = "0.3" +harfbuzz-sys = "0.5" ipc-channel = "0.14" lazy_static = "1" libc = "0.2" @@ -37,22 +37,22 @@ style = { path = "../style", features = ["servo"] } time = "0.1.12" ucd = "0.1.1" unicode-bidi = { version = "0.3", features = ["with_serde"] } -unicode-script = { version = "0.3", features = ["harfbuzz"] } +unicode-script = "0.5" webrender_api = { git = "https://github.com/servo/webrender" } xi-unicode = "0.1.0" [target.'cfg(target_os = "macos")'.dependencies] byteorder = "1.0" -core-foundation = "0.7" -core-graphics = "0.19" -core-text = "15.0" +core-foundation = "0.9" +core-graphics = "0.22" +core-text = "19.0" [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] -freetype = "0.4" +freetype = "0.7" servo_allocator = { path = "../allocator" } [target.'cfg(target_os = "linux")'.dependencies] -servo-fontconfig = "0.4" +servo-fontconfig = "0.5" [target.'cfg(target_os = "android")'.dependencies] xml-rs = "0.8" diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs index 47cf337011b..ef49bb32e68 100644 --- a/components/gfx/text/shaping/harfbuzz.rs +++ b/components/gfx/text/shaping/harfbuzz.rs @@ -191,6 +191,171 @@ impl Shaper { } } +pub fn unicode_to_hb_script(script: unicode_script::Script) -> harfbuzz_sys::hb_script_t { + use harfbuzz_sys::*; + use unicode_script::Script::*; + match script { + Adlam => HB_SCRIPT_ADLAM, + Ahom => HB_SCRIPT_AHOM, + Anatolian_Hieroglyphs => HB_SCRIPT_ANATOLIAN_HIEROGLYPHS, + Arabic => HB_SCRIPT_ARABIC, + Armenian => HB_SCRIPT_ARMENIAN, + Avestan => HB_SCRIPT_AVESTAN, + Balinese => HB_SCRIPT_BALINESE, + Bamum => HB_SCRIPT_BAMUM, + Bassa_Vah => HB_SCRIPT_BASSA_VAH, + Batak => HB_SCRIPT_BATAK, + Bengali => HB_SCRIPT_BENGALI, + Bhaiksuki => HB_SCRIPT_BHAIKSUKI, + Bopomofo => HB_SCRIPT_BOPOMOFO, + Brahmi => HB_SCRIPT_BRAHMI, + Braille => HB_SCRIPT_BRAILLE, + Buginese => HB_SCRIPT_BUGINESE, + Buhid => HB_SCRIPT_BUHID, + Canadian_Aboriginal => HB_SCRIPT_CANADIAN_SYLLABICS, + Carian => HB_SCRIPT_CARIAN, + Caucasian_Albanian => HB_SCRIPT_CAUCASIAN_ALBANIAN, + Chakma => HB_SCRIPT_CHAKMA, + Cham => HB_SCRIPT_CHAM, + Cherokee => HB_SCRIPT_CHEROKEE, + Chorasmian => HB_SCRIPT_CHORASMIAN, + Common => HB_SCRIPT_COMMON, + Coptic => HB_SCRIPT_COPTIC, + Cuneiform => HB_SCRIPT_CUNEIFORM, + Cypriot => HB_SCRIPT_CYPRIOT, + Cyrillic => HB_SCRIPT_CYRILLIC, + Deseret => HB_SCRIPT_DESERET, + Devanagari => HB_SCRIPT_DEVANAGARI, + Dives_Akuru => HB_SCRIPT_DIVES_AKURU, + Dogra => HB_SCRIPT_DOGRA, + Duployan => HB_SCRIPT_DUPLOYAN, + Egyptian_Hieroglyphs => HB_SCRIPT_EGYPTIAN_HIEROGLYPHS, + Elbasan => HB_SCRIPT_ELBASAN, + Elymaic => HB_SCRIPT_ELYMAIC, + Ethiopic => HB_SCRIPT_ETHIOPIC, + Georgian => HB_SCRIPT_GEORGIAN, + Glagolitic => HB_SCRIPT_GLAGOLITIC, + Gothic => HB_SCRIPT_GOTHIC, + Grantha => HB_SCRIPT_GRANTHA, + Greek => HB_SCRIPT_GREEK, + Gujarati => HB_SCRIPT_GUJARATI, + Gunjala_Gondi => HB_SCRIPT_GUNJALA_GONDI, + Gurmukhi => HB_SCRIPT_GURMUKHI, + Han => HB_SCRIPT_HAN, + Hangul => HB_SCRIPT_HANGUL, + Hanifi_Rohingya => HB_SCRIPT_HANIFI_ROHINGYA, + Hanunoo => HB_SCRIPT_HANUNOO, + Hatran => HB_SCRIPT_HATRAN, + Hebrew => HB_SCRIPT_HEBREW, + Hiragana => HB_SCRIPT_HIRAGANA, + Imperial_Aramaic => HB_SCRIPT_IMPERIAL_ARAMAIC, + Inherited => HB_SCRIPT_INHERITED, + Inscriptional_Pahlavi => HB_SCRIPT_INSCRIPTIONAL_PAHLAVI, + Inscriptional_Parthian => HB_SCRIPT_INSCRIPTIONAL_PARTHIAN, + Javanese => HB_SCRIPT_JAVANESE, + Kaithi => HB_SCRIPT_KAITHI, + Kannada => HB_SCRIPT_KANNADA, + Katakana => HB_SCRIPT_KATAKANA, + Kayah_Li => HB_SCRIPT_KAYAH_LI, + Kharoshthi => HB_SCRIPT_KHAROSHTHI, + Khitan_Small_Script => HB_SCRIPT_KHITAN_SMALL_SCRIPT, + Khmer => HB_SCRIPT_KHMER, + Khojki => HB_SCRIPT_KHOJKI, + Khudawadi => HB_SCRIPT_KHUDAWADI, + Lao => HB_SCRIPT_LAO, + Latin => HB_SCRIPT_LATIN, + Lepcha => HB_SCRIPT_LEPCHA, + Limbu => HB_SCRIPT_LIMBU, + Linear_A => HB_SCRIPT_LINEAR_A, + Linear_B => HB_SCRIPT_LINEAR_B, + Lisu => HB_SCRIPT_LISU, + Lycian => HB_SCRIPT_LYCIAN, + Lydian => HB_SCRIPT_LYDIAN, + Mahajani => HB_SCRIPT_MAHAJANI, + Makasar => HB_SCRIPT_MAKASAR, + Malayalam => HB_SCRIPT_MALAYALAM, + Mandaic => HB_SCRIPT_MANDAIC, + Manichaean => HB_SCRIPT_MANICHAEAN, + Marchen => HB_SCRIPT_MARCHEN, + Masaram_Gondi => HB_SCRIPT_MASARAM_GONDI, + Medefaidrin => HB_SCRIPT_MEDEFAIDRIN, + Meetei_Mayek => HB_SCRIPT_MEETEI_MAYEK, + Mende_Kikakui => HB_SCRIPT_MENDE_KIKAKUI, + Meroitic_Cursive => HB_SCRIPT_MEROITIC_CURSIVE, + Meroitic_Hieroglyphs => HB_SCRIPT_MEROITIC_HIEROGLYPHS, + Miao => HB_SCRIPT_MIAO, + Modi => HB_SCRIPT_MODI, + Mongolian => HB_SCRIPT_MONGOLIAN, + Mro => HB_SCRIPT_MRO, + Multani => HB_SCRIPT_MULTANI, + Myanmar => HB_SCRIPT_MYANMAR, + Nabataean => HB_SCRIPT_NABATAEAN, + Nandinagari => HB_SCRIPT_NANDINAGARI, + New_Tai_Lue => HB_SCRIPT_NEW_TAI_LUE, + Newa => HB_SCRIPT_NEWA, + Nko => HB_SCRIPT_NKO, + Nushu => HB_SCRIPT_NUSHU, + Nyiakeng_Puachue_Hmong => HB_SCRIPT_NYIAKENG_PUACHUE_HMONG, + Ogham => HB_SCRIPT_OGHAM, + Ol_Chiki => HB_SCRIPT_OL_CHIKI, + Old_Hungarian => HB_SCRIPT_OLD_HUNGARIAN, + Old_Italic => HB_SCRIPT_OLD_ITALIC, + Old_North_Arabian => HB_SCRIPT_OLD_NORTH_ARABIAN, + Old_Permic => HB_SCRIPT_OLD_PERMIC, + Old_Persian => HB_SCRIPT_OLD_PERSIAN, + Old_Sogdian => HB_SCRIPT_OLD_SOGDIAN, + Old_South_Arabian => HB_SCRIPT_OLD_SOUTH_ARABIAN, + Old_Turkic => HB_SCRIPT_OLD_TURKIC, + Oriya => HB_SCRIPT_ORIYA, + Osage => HB_SCRIPT_OSAGE, + Osmanya => HB_SCRIPT_OSMANYA, + Pahawh_Hmong => HB_SCRIPT_PAHAWH_HMONG, + Palmyrene => HB_SCRIPT_PALMYRENE, + Pau_Cin_Hau => HB_SCRIPT_PAU_CIN_HAU, + Phags_Pa => HB_SCRIPT_PHAGS_PA, + Phoenician => HB_SCRIPT_PHOENICIAN, + Psalter_Pahlavi => HB_SCRIPT_PSALTER_PAHLAVI, + Rejang => HB_SCRIPT_REJANG, + Runic => HB_SCRIPT_RUNIC, + Samaritan => HB_SCRIPT_SAMARITAN, + Saurashtra => HB_SCRIPT_SAURASHTRA, + Sharada => HB_SCRIPT_SHARADA, + Shavian => HB_SCRIPT_SHAVIAN, + Siddham => HB_SCRIPT_SIDDHAM, + SignWriting => HB_SCRIPT_SIGNWRITING, + Sinhala => HB_SCRIPT_SINHALA, + Sogdian => HB_SCRIPT_SOGDIAN, + Sora_Sompeng => HB_SCRIPT_SORA_SOMPENG, + Soyombo => HB_SCRIPT_SOYOMBO, + Sundanese => HB_SCRIPT_SUNDANESE, + Syloti_Nagri => HB_SCRIPT_SYLOTI_NAGRI, + Syriac => HB_SCRIPT_SYRIAC, + Tagalog => HB_SCRIPT_TAGALOG, + Tagbanwa => HB_SCRIPT_TAGBANWA, + Tai_Le => HB_SCRIPT_TAI_LE, + Tai_Tham => HB_SCRIPT_TAI_THAM, + Tai_Viet => HB_SCRIPT_TAI_VIET, + Takri => HB_SCRIPT_TAKRI, + Tamil => HB_SCRIPT_TAMIL, + Tangut => HB_SCRIPT_TANGUT, + Telugu => HB_SCRIPT_TELUGU, + Thaana => HB_SCRIPT_THAANA, + Thai => HB_SCRIPT_THAI, + Tibetan => HB_SCRIPT_TIBETAN, + Tifinagh => HB_SCRIPT_TIFINAGH, + Tirhuta => HB_SCRIPT_TIRHUTA, + Ugaritic => HB_SCRIPT_UGARITIC, + Unknown => HB_SCRIPT_UNKNOWN, + Vai => HB_SCRIPT_VAI, + Warang_Citi => HB_SCRIPT_WARANG_CITI, + Wancho => HB_SCRIPT_WANCHO, + Yezidi => HB_SCRIPT_YEZIDI, + Yi => HB_SCRIPT_YI, + Zanabazar_Square => HB_SCRIPT_ZANABAZAR_SQUARE, + _ => HB_SCRIPT_UNKNOWN, + } +} + impl ShaperMethods for Shaper { /// Calculate the layout metrics associated with the given text when painted in a specific /// font. @@ -206,7 +371,7 @@ impl ShaperMethods for Shaper { }, ); - hb_buffer_set_script(hb_buffer, options.script.to_hb_script()); + hb_buffer_set_script(hb_buffer, unicode_to_hb_script(options.script)); hb_buffer_add_utf8( hb_buffer, diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 90aaaa58011..a6bc544f9b3 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -48,7 +48,7 @@ smallvec = { version = "0.6", features = ["std", "union"] } style = { path = "../style", features = ["servo", "servo-layout-2013"] } style_traits = { path = "../style_traits" } unicode-bidi = { version = "0.3", features = ["with_serde"] } -unicode-script = { version = "0.3", features = ["harfbuzz"] } +unicode-script = "0.5" webrender_api = { git = "https://github.com/servo/webrender" } xi-unicode = "0.1.0" diff --git a/components/layout/text.rs b/components/layout/text.rs index 1d9fae80297..979443feae4 100644 --- a/components/layout/text.rs +++ b/components/layout/text.rs @@ -29,7 +29,7 @@ use style::properties::ComputedValues; use style::values::generics::text::LineHeight; use style::values::specified::text::{TextTransform, TextTransformCase}; use unicode_bidi as bidi; -use unicode_script::{get_script, Script}; +use unicode_script::Script; use xi_unicode::LineBreakLeafIter; /// Returns the concatenated text of a list of unscanned text fragments. @@ -259,7 +259,7 @@ impl TextRunScanner { // // TODO: Special handling of paired punctuation characters. // http://www.unicode.org/reports/tr24/#Common - let script = get_script(character); + let script = Script::from(character); let compatible_script = is_compatible(script, run_info.script); if compatible_script && !is_specific(run_info.script) && is_specific(script) { diff --git a/components/layout_2020/Cargo.toml b/components/layout_2020/Cargo.toml index 6ca3d709627..75a948fa56d 100644 --- a/components/layout_2020/Cargo.toml +++ b/components/layout_2020/Cargo.toml @@ -42,7 +42,7 @@ servo_arc = { path = "../servo_arc" } servo_url = { path = "../url" } style = { path = "../style", features = ["servo", "servo-layout-2020"] } style_traits = { path = "../style_traits" } -unicode-script = { version = "0.3", features = ["harfbuzz"] } +unicode-script = "0.5" webrender_api = { git = "https://github.com/servo/webrender" } [dev-dependencies] diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 15aff372673..7c431f1c6b3 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -53,7 +53,7 @@ env_logger = "0.7" euclid = "0.20" gfx = { path = "../gfx" } gfx_traits = { path = "../gfx_traits" } -gleam = "0.11" +gleam = "0.12" gstreamer = { version = "0.15", features = ["v1_16"], optional = true } ipc-channel = "0.14" keyboard-types = "0.5" diff --git a/servo-tidy.toml b/servo-tidy.toml index 0a5db6203fc..0bb3eae35cb 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -32,7 +32,6 @@ packages = [ "arrayvec", "base64", "cocoa", - "deflate", "gleam", "libloading", "metal", @@ -40,7 +39,6 @@ packages = [ "num-rational", "parking_lot", "parking_lot_core", - "png", "wayland-sys", # https://github.com/servo/servo/issues/26933 @@ -65,7 +63,6 @@ packages = [ "core-foundation", "core-foundation-sys", "core-graphics", - "core-text", "lyon_geom", # Duplicated by webrender debugger via ws