dhowe / AdNauseam

AdNauseam: Fight back against advertising surveillance
GNU General Public License v3.0
4.51k stars 189 forks source link

Fallback font that supports scripts other than latin #2288

Closed mneunomne closed 1 year ago

mneunomne commented 1 year ago
Снимок экрана 2023-02-21 в 12 57 21

Besides the obvious layout issues with the different size of string https://github.com/dhowe/AdNauseam/issues/2246, would be also good to have a fallback font that has UTF-8 support for scripts other than latin that can match this same style (something like impact? i'm not sure). The issue here is with the 'bebas_neue' font that we are using.

mneunomne commented 1 year ago

Found this font "Yanone Kaffeesatz" with free lincense which is condensed and has support for cyrilic alphabets:

https://fonts.google.com/specimen/Yanone+Kaffeesatz?category=Sans+Serif&subset=cyrillic&width=2&noto.lang=bg_Cyrl&noto.script=Cyrl

mneunomne commented 1 year ago

Before:

Bildschirm­foto 2023-02-21 um 14 45 17 Bildschirm­foto 2023-02-21 um 14 45 14

After:

Bildschirm­foto 2023-02-21 um 14 42 45 Bildschirm­foto 2023-02-21 um 14 42 41 Снимок экрана 2023-02-21 в 14 39 21
mneunomne commented 1 year ago

@mushon let me know if this is ok, if you find another font maybe with wider support, let me know and I can substitute.

mneunomne commented 1 year ago

Test fonts for other writing systems:

mushon commented 1 year ago

I suggest we build the stack like this:

  1. Bebas Neue https://fonts.google.com/specimen/Bebas+Neue?preview.text=ADNAUSEAM&preview.text_type=custom&query=bebas
  2. Roboto Flex https://fonts.google.com/specimen/Roboto+Flex/tester?vfonly=true&preview.text=ADNAUSEAM&preview.text_type=custom
  3. Noto Sans Display https://fonts.google.com/noto/specimen/Noto+Sans+Display/tester?vfonly=true&query=noto+sans&preview.text=ADNAUSEAM&preview.text_type=custom

Does that make sense?

Mushon Zer-Aviv

///

Recent: Friction & Flow Keynote @ RISD https://youtu.be/J2uV8DByF9g Normalizi.ng https://normalizi.ng/ What do normal people look like? https://www.goethe.de/prj/zei/en/pdk/22769146.html

///

mushon.com http://mushon.com/ @mushon http://twitter.com/mushon

On 21 Feb 2023, at 15:46, Alberto Harres @.***> wrote:

@mushon https://github.com/mushon let me know if this is ok, if you find another font maybe with wider support, let me know and I can substitute.

— Reply to this email directly, view it on GitHub https://github.com/dhowe/AdNauseam/issues/2288#issuecomment-1438520590, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAGT4342XRFQYVWBSPPWRLWYTBMVANCNFSM6AAAAAAVC6XYGQ. You are receiving this because you were mentioned.

mneunomne commented 1 year ago

@mushon yes, makes sense. I just need to know what width (or other variable axes) should I use Roboto Flex and Noto Sans to match the shape of bebas neue, so it is condensed the same way.

mushon commented 1 year ago

Yes, that’s the idea. They are both variable fonts so you can get pretty close to the width on Bebas with them.

mneunomne commented 1 year ago

Cool, tested now with multiple languges and looks good, they are following the font fallback order as you mentioned:

  1. Bebas Neue https://fonts.google.com/specimen/Bebas+Neue?preview.text=ADNAUSEAM&preview.text_type=custom&query=bebas
  2. Roboto Flex https://fonts.google.com/specimen/Roboto+Flex/tester?vfonly=true&preview.text=ADNAUSEAM&preview.text_type=custom
  3. Noto Sans Display https://fonts.google.com/noto/specimen/Noto+Sans+Display/tester?vfonly=true&query=noto+sans&preview.text=ADNAUSEAM&preview.text_type=custom

Chinese (Traditional)

截圖 2023-02-21 18 21 31

截圖 2023-02-21 18 21 26

Japanese

スクリーンショット 2023-02-21 18 20 15 スクリーンショット 2023-02-21 18 20 12 スクリーンショット 2023-02-21 18 20 01

Ukranian

Знімок екрана 2023-02-21 о 18 19 29 스크린샷 2023-02-21 18 17 36

Chinese (Simplified)

截屏2023-02-21 18 17 01 截屏2023-02-21 18 16 45

Russian

Снимок экрана 2023-02-21 в 18 16 12 Снимок экрана 2023-02-21 в 18 16 07 Снимок экрана 2023-02-21 в 18 16 03
mneunomne commented 1 year ago

Hindi

स्क्रीनशॉट 2023-02-21, 18 37 14 पर

Bengali

Screenshot 2023-02-21 at 18 36 42 Screenshot 2023-02-21 at 18 36 33
mushon commented 1 year ago

Great, thanks!

mneunomne commented 1 year ago

Implemented, closing.