Blog

No existen fuentes Minchou (serif) CJK en Android

No existen fuentes Minchou (serif) CJK en Android

Actualización: sí existen, parece que a partir de Android 9

A partir de Android 9 se incluye:

/system/fonts/NotoSerifCJK-Regular.ttc

Una referencia:

Use Noto Serif CJK as the default serif fonts for Chinese, Japanese and Korean

Android P has Noto Serif CJK as the default serif fonts for Chinese, Japanese and Korean, so we can add it to the font.name-lists.

https://bugzilla.mozilla.org/show_bug.cgi?id=1481031

En este enlace se ve cómo añaden Noto Serif CJK (JP, KR, SC, TC: japonés, coreano, chino simplificado, chino tradicional)

Otra referencia aquí:

fonts: Build different fonts.xml if EXCLUDE_SERIF_FONTS is true

* Google introduced a commit to exclude serif fonts ( for saving some system space)
https://android.googlesource.com/platform/external/noto-fonts/+/c1fe8849cbec6ccc0d315e88936485bb53fe34a3

Now if the flag is used, then it will not build the fallback serif fonts but the fonts.xml still have the fallback serif font file mapping which results in below logspam

E/Typeface: Error mapping font file /system/fonts/NotoSerifEthiopic-Regular.otf
E/Typeface: Error mapping font file /system/fonts/NotoSerifEthiopic-Bold.otf
E/Typeface: Error mapping font file /system/fonts/NotoSerifCJK-Regular.ttc and so on......

So, add a check for EXCLUDE_SERIF_FONTS flag and copy respective fonts.xml

* Also, Fix compiling generic fonts

Co-authored-by: neobuddy89 <neobuddy89@gmail.com>

Signed-off-by: Akianonymus <anonymus.aki@gmail.com>
Change-Id: Iabedb2c2747272f15baff109833f8a37f38d73a8

El commit de Google c1fe8849cbec6ccc0d315e88936485bb53fe34a3 del que habla tiene fecha del 18 de enero de 2018, y, como explica arriba, es una opción para eliminar las fuentes serif CJK y así ahorrar espacio. Esto implica que en esa fecha ya existía NotoSerifCJK en Android.

Veamos Android.mk en el commit c1fe8849cbec6ccc0d315e88936485bb53fe34a3. Se incluye si EXCLUDE_SERIF_FONTS y SMALLER_FONT_FOOTPRINT son falsos:

#############################################################################
# Similary "build" the Noto CJK fonts for serif family.
# These are not included in SMALLER_FONT_FOOTPRINT builds.
#############################################################################
ifeq ($(filter true,$(EXCLUDE_SERIF_FONTS) $(SMALLER_FONT_FOOTPRINT)),)
LOCAL_PATH := $(NOTO_DIR)/cjk

font_src_files := \
    NotoSerifCJK-Regular.ttc

$(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
font_src_files :=

endif # !EXCLUDE_SERIF_FONTS && !SMALLER_FONT_FOOTPRINT

Artículo original

En este sitio tengo puesto font-family a serif («Minchou», 明朝 en japonés), pero en Android se muestra sans («Gothic», ゴシック). Sorprendentemente, Android no tiene fuentes serif preinstaladas:

Android
Japanese Serif or Mincho fonts are not available on Android devices.

https://amayadori.cloud/blog/japanese-font-family?amp

デザイナーに知ってほしいWebでのフォント周りの話

✅Androidは明朝体がない
✅Windowsはヒラギノは買わないと無い
✅游フォントはWindowsでは汚く見える可能性
✅10px以下は原則的にブラウザで表示できない(※)
✅文字組を妥協する勇気
✅そのフォント、Webフォントとして使えるか確認必須

https://twitter.com/tak_dcxi/status/1297887299238113281?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E1297887299238113281%7Ctwgr%5E%7Ctwcon%5Es1_c10&ref_url=https%3A%2F%2Fembed.zenn.studio%2Ftweetzenn-embedded__f62e8405461fb

Traduciendo:

Cosas que quiero que los diseñadores conozcan sobre las fuentes en Web:

  • En Android no hay fuentes serif
  • En Windows no hay Hiragino salvo que se haya comprado.
  • Es posible que Yu Gothic se vea «sucia» en Windows.
  • Por lo general, las fuentes de 10px para abajo no se muestran.
  • Es necesario aguantarse y llegar a un compromiso.
  • Es necesario comprobar que las fuentes se puedan usar como Web fonts.

Androidに明朝体は無い
Apple製品しか利用しないデザイナーの方に話したら非常に驚かれるのですが、Androidにはデフォルトで明朝体は入っていないです。

よく明朝体マシマシのデザインを見かけたりするのですが、デバイスフォントだけではAndroidでそのデザインを実現することは不可能だと思っておいたほうが良いでしょう。

ただ、明朝体のWebフォントを利用すればAndroidでも明朝体は表示できるので、デザイン的に明朝体が必須って場合はWebフォントを利用しない手は無いと思います。

個人的見解ですが、デザイン重視なら明朝体はGoogle FontsでNoto Serif CJKを利用するのが一番だと思います。Androidを意識しない場合でもそうです。

游明朝はWindowsだとかすれて読みにくくなる可能性(後述)
だからといって他のWindowsのデバイス明朝体はダサい
Internet Explorer(笑)でline-heightがズレるバグが起こらない
もちろん、日本語のWebフォントは重く、キャッシュの効かない初回アクセス時には不利であることは間違いないでしょう。デザインとパフォーマンス、どちらを優先するかは案件や環境とご相談ください。

https://zenn.dev/tak_dcxi/articles/588fbc205251043dc357#android%E3%81%AB%E6%98%8E%E6%9C%9D%E4%BD%93%E3%81%AF%E7%84%A1%E3%81%84

En Android no hay Minchou.

Cuando se lo decimos a diseñadores que sólo usan productos de Apple se sorprenden, pero en Android no se incluyen fuentes Minchou por defecto.

Es habitual encontrar Minchou en el diseño, pero hay que hacerse a la idea de que en Android no es posible únicamente con las fuentes del sistema.

Sin embargo, se puede utilizar Mincho en Android con Web fonts. Creo que no es posible un diseño con Minchou sin emplear web fonts.

Personalmente, poniendo énfasis en el diseño, pienso que las Noto Serif CJK de Google son las mejores. Incluso aunque no fuese consciente sobre (el problema de su ausencia) en Android.

Yu Minchou puede verse borrosa y resultar difícil de leer en Windows

Dicho esto, otras fuentes Minchou de Windows son feas.

En Internet Explorer (risas) no ocurre el bug de desplazamiento de line-height.

Por supuesto, las Web fonts japonesas ocupan mucho, es sin duda una desventaja al acceder por primera vez y no estar cacheadas. Por favor, consulte qué es lo prioritario, si el diseño o el rendimiento.

Es posible instalar fuentes con root, pero me parece mucho complicarse la vida…

A todo esto, en iOS sí hay Minchou, Hiragino:

iOS
HiraMinProN-W3 / HiraMinProN-W6
Short term for Hiragino Mincho ProN.

https://amayadori.cloud/blog/japanese-font-family?amp

… y por lo que he visto se pueden instalar fuentes adicionales a partir de iOS 13