wikimedia/wikipedia
Viewer • Updated • 61.6M • 280k • 1.68k
This is not an officially supported Google product.
Pretrained MLFont machine-learning-guided font slicing model and WOFF2 slice bundle for Noto Sans TC (Traditional Chinese) (NotoSansTC-Regular.otf, 20,637 Unicode codepoints partitioned into 82 range-compact slices).
NotoSansTC-Regular.otf (20,637 Unicode codepoints)wikimedia/wikipedia (20231101, languages: zh), 1,600 training articles and 400 uniformly sampled testing articlesmlfont preset: traditional_chinese)unicode-range intervals).woff2 files (companion CSS: 121.7 KB)model.safetensors: Learned topic-codepoint weight matrices (lambda_matrix, dnntm_lambda_matrix), codepoints, remaining_codepoints, frequency_array, and dna_assignment in SafeTensors formatstrategy.json: Range-Compact GA SlicingStrategy definition and hyperparametersolda_strategy.json: Online LDA + Greedy SlicingStrategy definitiondnntm_strategy.json: DNNTM (Entropy Difference Loss) + Greedy SlicingStrategy definitiontest_samples.json: Exact held-out evaluation codepoint sets (400 test pages)config.json: Model and font bundle summary metadata (including per-slice WOFF2 byte sizes)font_sliced.css: Production-ready @font-face stylesheet with compact unicode-range descriptorswoff2/*.woff2: 82 physical WOFF2 font slices generated via fontTools.subsetnam/*.nam: 82 Google Fonts .nam codepoint subset filesevaluation_metrics.json: Full benchmark metrics across all 7 network/session profiles| Strategy | Slices | CSS Ranges | Missing (Eval / Font) | GIN-2g Mean / P95 (ms) | GIN-3g Mean / P95 (ms) | DSL Mean / P95 (ms) | Session Util (%) |
|---|---|---|---|---|---|---|---|
single_slice |
1 | 5036 | 0 / 0 | 125.58 / 704.12 | 31.43 / 176.24 | 6.28 / 35.18 | 7.88% |
equal_bin_82 |
82 | 5098 | 0 / 0 | 115.29 / 689.78 | 31.03 / 185.64 | 5.54 / 33.17 | 9.67% |
random_slice_82 |
82 | 20436 | 0 / 0 | 144.57 / 922.42 | 38.91 / 248.25 | 6.95 / 44.36 | 7.88% |
language_slice |
10 | 5767 | 126 / 11699 | 52.25 / 282.95 | 13.23 / 71.40 | 2.60 / 14.08 | 18.89% |
most_600_600_equal_bin_80 |
82 | 6672 | 0 / 0 | 92.66 / 446.08 | 24.90 / 119.91 | 4.46 / 21.47 | 9.83% |
online_lda_topics80_greedy |
82 | 11867 | 0 / 0 | 50.11 / 250.61 | 13.43 / 67.58 | 2.42 / 12.04 | 19.59% |
dnntm_topics80_greedy |
82 | 11410 | 0 / 0 | 51.65 / 226.65 | 13.84 / 60.72 | 2.49 / 10.93 | 19.30% |
| range_compact_most600_600_topics80 (This Model) | 82 | 11150 | 0 / 0 | 56.02 / 267.26 | 14.99 / 71.75 | 2.70 / 12.87 | 16.93% |
Install mlfont:
pip install mlfont huggingface_hub
Load the pretrained bundle (Range-Compact GA, Online LDA, and DNNTM) in Python:
import mlfont
bundle = mlfont.load_pretrained("wq2012/mlfont-notosanstc")
print("GA:", bundle.strategy.name, "ranges:", bundle.strategy.count_unicode_ranges())
print("LDA:", bundle.olda_strategy.name, "ranges:", bundle.olda_strategy.count_unicode_ranges())
print("DNNTM:", bundle.dnntm_strategy.name, "ranges:", bundle.dnntm_strategy.count_unicode_ranges())
@article{wang2017learning,
title={Learning Better Font Slicing Strategies from Data},
author={Wang, Quan and Mao, Yiran},
journal={Technical Disclosure Commons, Defensive Publications Series},
volume={906},
year={2017}
}