Giter Club home page Giter Club logo

noto-cjk-vf-magisk's Introduction

Noto CJK VF Magisk

A module replace CJK fonts to Noto CJK Variable.

Sister module: Source-Han-VF-Magisk

Requirement

Android 8.0 and above. 9.0 for serif support.

Advantage

Compare to normal super OTC version, only 38.9MB for all weight.

This module inculdes demi-light weight that Android developers won't use. Because Roboto (Default font of Latin characters on Android) doesn't have this weight.

notocjk use Noto Serif CJK subset to avoid GitHub file size limit of single file. This module split it as two part.

Try variable

Variable Font Test App Preview

Font

Both font had been modified with subset_noto_cjk.py. And add chws feature with kojiishi/east_asian_spacing: OpenType East Asian Contextual Spacing Build Tools.

Noto Sans CJK VF download

noto-cjk/Sans/Variable at main · googlefonts/noto-cjk

Noto Serif CJK VF download

noto-cjk/Serif/Variable at main · googlefonts/noto-cjk

wght value

Tools: googlefonts/fonttools: A library to manipulate font files from Python. See also: fvar — Font Variations Table (OpenType 1.8.4) - Typography | Microsoft Docs

# SC as a example. They were same.
ttx -y 3 -t fvar NotoSansCJK-VF.ttc
  <fvar>

    <!-- Weight -->
    <Axis>
      <AxisTag>wght</AxisTag>
      <Flags>0x0</Flags>
      <MinValue>100.0</MinValue>
      <DefaultValue>100.0</DefaultValue>
      <MaxValue>900.0</MaxValue>
      <AxisNameID>265</AxisNameID>
    </Axis>

    <!-- Thin -->
    <!-- PostScript: NotoSansCJKscVF-Thin -->
    <NamedInstance flags="0x0" postscriptNameID="267" subfamilyNameID="266">
      <coord axis="wght" value="100.0"/>
    </NamedInstance>

    <!-- Light -->
    <!-- PostScript: NotoSansCJKscVF-Light -->
    <NamedInstance flags="0x0" postscriptNameID="269" subfamilyNameID="268">
      <coord axis="wght" value="300.0"/>
    </NamedInstance>

    <!-- DemiLight -->
    <!-- PostScript: NotoSansCJKscVF-DemiLight -->
    <NamedInstance flags="0x0" postscriptNameID="271" subfamilyNameID="270">
      <coord axis="wght" value="350.0"/>
    </NamedInstance>

    <!-- Regular -->
    <!-- PostScript: NotoSansCJKscVF-Regular -->
    <NamedInstance flags="0x0" postscriptNameID="273" subfamilyNameID="272">
      <coord axis="wght" value="400.0"/>
    </NamedInstance>

    <!-- Medium -->
    <!-- PostScript: NotoSansCJKscVF-Medium -->
    <NamedInstance flags="0x0" postscriptNameID="275" subfamilyNameID="274">
      <coord axis="wght" value="500.0"/>
    </NamedInstance>

    <!-- Bold -->
    <!-- PostScript: NotoSansCJKscVF-Bold -->
    <NamedInstance flags="0x0" postscriptNameID="277" subfamilyNameID="276">
      <coord axis="wght" value="700.0"/>
    </NamedInstance>

    <!-- Black -->
    <!-- PostScript: NotoSansCJKscVF-Black -->
    <NamedInstance flags="0x0" postscriptNameID="279" subfamilyNameID="278">
      <coord axis="wght" value="900.0"/>
    </NamedInstance>
  </fvar>

noto-cjk-vf-magisk's People

Contributors

maidmeow4 avatar wordlessecho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

maidmeow4

noto-cjk-vf-magisk's Issues

Sans-serif font will fallback to serif in some apps

Firefox

Screenshot_20210411-191402_Firefox

Related issue: mozilla-mobile/fenix#12045

You can add 'Noto Sans CJK [JP/KR/SC/HK/TC] VF' to font.name-list.sans-serif.[ja/ko/zh-CN/zh-HK/zh-TW] in about:config. But the font weight is incorrect (always thin and blod still be fallbacked to serif).
Screenshot_20210411-200752_Firefox_Nightly

Because this module is design to replace Noto Sans CJK. I will try to convice Mozilla add variable font support to CJK (even more) languages.

Webview in Taobao and QQ

See #6

Arknights

Feedback from a anonymous user:
500158400242_44693

可否擴展至9字重?

使用VF版本代表在保有容量優勢的情形下,其字重可以根據需求做出調整。
目前此模組根據之前的配置有著7字重100,300,350,400,500,700,900
是否可以拓展成9字重
100,200,300,400,500,600,700,800,900
呢?

Incorrect index for VF

# simonsmh @ 5600X in ~/Projects/Magisk/magisk-notocjk on git:master x [0:08:55] C:130
$ otc2otf system/fonts/NotoSansCJK-VF.ttc -r
Input font: NotoSansCJK-VF.ttc

Font 0: NotoSansCJKhk-Variable.otf
    tag     checksum    length    offset
    ----  ----------  --------  --------
    BASE  0x6C1B8E98       278      1852
    CFF2  0xECA22012  37603702      2132
    DSIG  0x00000001         8  37605836
    GDEF  0xDAB4F4EC       182  37605844
    GPOS  0xBCA60732     78464  37606028
    GSUB  0xA5FA1FCF    163368  37998348
    HVAR  0x9C149F4E    131120  38829576
    OS/2  0x91BF0EAF        96  38960696
    STAT  0x80E791BA       182  38960888
    VORG  0x91052902       988  38961072
    VVAR  0x550E3057     59468  38962060
    avar  0x8D7B8C01        42  39021528
    cmap  0x397B3572    227536  39021572
    fvar  0x8B8A7578       106  40207620
    head  0x1FD3C0DD        54  40207728
    hhea  0x0C1F088E        36  40208008
    hmtx  0xE2DD5830    262134  40208044
    maxp  0xFFFF5000         6  40470180
    name  0x1D260206      3276  40470188
    post  0xFF860032        32  40486568
    vhea  0x0CBF15C2        36  40486600
    vmtx  0x9D93F118    261386  40486636

Font 1: NotoSansCJKjp-Variable.otf
    tag     checksum    length    offset
    ----  ----------  --------  --------
    BASE  - shared -
    CFF2  - shared -
    DSIG  - shared -
    GDEF  - shared -
    GPOS  0xBCA60732     78464  37684492
    GSUB  0x9841AD96    172968  38161716
    HVAR  - shared -
    OS/2  0x91BF0EA3        96  38960792
    STAT  - shared -
    VORG  - shared -
    VVAR  - shared -
    avar  - shared -
    cmap  0x8C118206    257191  39249108
    fvar  - shared -
    head  0x1FD3C0E4        54  40207784
    hhea  - shared -
    hmtx  - shared -
    maxp  - shared -
    name  0x2949F569      3276  40473464
    post  - shared -
    vhea  - shared -
    vmtx  - shared -

Font 2: NotoSansCJKkr-Variable.otf
    tag     checksum    length    offset
    ----  ----------  --------  --------
    BASE  - shared -
    CFF2  - shared -
    DSIG  - shared -
    GDEF  - shared -
    GPOS  0xBC6A076E     78464  37762956
    GSUB  0xF5FD7AE5    162852  38334684
    HVAR  - shared -
    OS/2  - shared -
    STAT  - shared -
    VORG  - shared -
    VVAR  - shared -
    avar  - shared -
    cmap  0x6880D04E    233540  39506300
    fvar  - shared -
    head  0x1FD3C118        54  40207840
    hhea  - shared -
    hmtx  - shared -
    maxp  - shared -
    name  0x2E59FA85      3276  40476740
    post  - shared -
    vhea  - shared -
    vmtx  - shared -

Font 3: NotoSansCJKsc-Variable.otf
    tag     checksum    length    offset
    ----  ----------  --------  --------
    BASE  - shared -
    CFF2  - shared -
    DSIG  - shared -
    GDEF  - shared -
    GPOS  0xBC6A076E     78464  37841420
    GSUB  0x87D1AADE    163820  38497536
    HVAR  - shared -
    OS/2  - shared -
    STAT  - shared -
    VORG  - shared -
    VVAR  - shared -
    avar  - shared -
    cmap  0x9C5F5B07    236831  39739840
    fvar  - shared -
    head  0x1FD3C149        54  40207896
    hhea  - shared -
    hmtx  - shared -
    maxp  - shared -
    name  0x185E0EED      3276  40480016
    post  - shared -
    vhea  - shared -
    vmtx  - shared -

Font 4: NotoSansCJKtc-Variable.otf
    tag     checksum    length    offset
    ----  ----------  --------  --------
    BASE  - shared -
    CFF2  - shared -
    DSIG  - shared -
    GDEF  - shared -
    GPOS  0xBC5B06F5     78464  37919884
    GSUB  0x725A3FD1    168220  38661356
    HVAR  - shared -
    OS/2  - shared -
    STAT  - shared -
    VORG  - shared -
    VVAR  - shared -
    avar  - shared -
    cmap  0xB5D7BAA3    230948  39976672
    fvar  - shared -
    head  0x1FD3C17B        54  40207952
    hhea  - shared -
    hmtx  - shared -
    maxp  - shared -
    name  0x144205F2      3276  40483292
    post  - shared -
    vhea  - shared -
    vmtx  - shared -

QQ天气小程序界面部分字体Fallback到Noto Serif

机型是一加7Pro,新添加的fonts_base.xml配置起作用了,所以可以将描述文件中的untested去除。
QQ天气里的地名、温度等字体变成了宋体。如下图
Screenshot_20210413-202321
同样情况在淘宝收集淘金币界面也有发生,如下图
Screenshot_20210413-202411~2

用最新notocjk模块的话这些字体都是正常的无衬线字体…
如下图QQ天气界面
Screenshot_20210413-201940

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.