wikimedia/wikipedia
Viewer • Updated • 61.6M • 290k • 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 SC (Simplified Chinese) (NotoSansSC-Regular.otf, 30,759 Unicode codepoints partitioned into 102 range-compact slices).
NotoSansSC-Regular.otf (30,759 Unicode codepoints)wikimedia/wikipedia (20231101, languages: zh), 1,600 training articles and 400 uniformly sampled testing articlesmlfont preset: chinese)unicode-range intervals).woff2 files (companion CSS: 83.9 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: 102 physical WOFF2 font slices generated via fontTools.subsetnam/*.nam: 102 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 | 418 | 0 / 0 | 253.67 / 1629.56 | 63.47 / 407.72 | 12.68 / 81.45 | 5.55% |
equal_bin_102 |
102 | 519 | 0 / 0 | 169.75 / 1165.36 | 45.26 / 310.69 | 8.21 / 56.33 | 7.63% |
random_slice_102 |
102 | 30457 | 0 / 0 | 242.74 / 1930.38 | 64.71 / 514.64 | 11.73 / 93.32 | 5.55% |
language_slice |
10 | 6646 | 126 / 19659 | 86.54 / 554.31 | 21.82 / 139.59 | 4.31 / 27.61 | 16.05% |
most_1000_500_equal_bin_100 |
102 | 2965 | 0 / 0 | 110.52 / 502.64 | 29.38 / 131.07 | 5.35 / 24.59 | 7.82% |
google_fonts_ea_2017 |
102 | 6063 | 0 / 0 | 115.96 / 609.01 | 30.29 / 160.05 | 5.67 / 29.67 | 7.74% |
online_lda_topics100_greedy |
102 | 10177 | 0 / 0 | 60.16 / 314.64 | 15.93 / 83.23 | 2.92 / 15.27 | 16.90% |
dnntm_topics100_greedy |
102 | 9640 | 0 / 0 | 59.30 / 311.97 | 15.71 / 82.49 | 2.88 / 15.14 | 16.57% |
| range_compact_most1000_500_topics100 (This Model) | 102 | 5935 | 0 / 0 | 66.67 / 356.73 | 17.67 / 94.33 | 3.23 / 17.32 | 14.64% |
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-notosanssc")
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}
}