base: Remove ucd dependency (#32424)

Remove the `ucd` dependency which has not been updated in 8 years. In
addition, replace it with a generated UnicodeBlock enum which reflects
the modern Unicode standard. This is generated via a Python script which
is included in the repository. The generation is not part of the build
process, because the Unicode database is hosted on the web and it does
not change the frequently.

This is done instead of bringing in the more up-to-date `unicode_blocks`
dependency. `unicode_blocks` defines each block as constant, which means
that they cannot be used in match statements -- which we do in Servo.

Co-authored-by: Lauryn Menard <lauryn.menard@gmail.com>
This commit is contained in:
Martin Robinson 2024-06-03 19:10:01 +02:00 committed by GitHub
parent 48ab8d8847
commit f8985c5521
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 834 additions and 100 deletions

View file

@ -9,10 +9,10 @@ use std::collections::LinkedList;
use std::sync::Arc;
use app_units::Au;
use base::text::is_bidi_control;
use gfx::font::{self, FontMetrics, FontRef, RunMetrics, ShapingFlags, ShapingOptions};
use gfx::font_cache_thread::FontIdentifier;
use gfx::text::glyph::ByteIndex;
use gfx::text::util::is_bidi_control;
use log::{debug, warn};
use range::Range;
use style::computed_values::text_rendering::T as TextRendering;