Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Single ttf for all languages #13

Closed
GoogleCodeExporter opened this issue Jun 8, 2015 · 31 comments
Closed

Single ttf for all languages #13

GoogleCodeExporter opened this issue Jun 8, 2015 · 31 comments

Comments

@GoogleCodeExporter
Copy link

Hi,

Is it possible to include the characters of all the languages in a single ttf 
file?
For example, if I use NotoSans-Regular.ttf I am able to print characters for 
Bulgarian, Czech, Danish, Dutch, Finnish, French, German, Estonian, Greek, 
Hungarian, Icelandic, Macedonian, Russian, Polish, Portuguese, Vietnamese and 
Turkish. But not for Arabic, Hindi, Bengali, Japanese, Mandarin, Hebrew and 
Catonese.

I can use only a single ttf file.

Regards

Original issue reported on code.google.com by akanksha...@gmail.com on 2 Sep 2013 at 4:38

@klokan
Copy link

klokan commented Jul 21, 2016

Technically, it should be possible to make a single huge multi-language TTF font file with a subset of the glyphs available in Noto.
An example of how to encode such font could be the 23MB TTF file of "Arial Unicode MS": https://www.microsoft.com/typography/fonts/font.aspx?fmid=1081

Would it be possible to prepare a script which extracts a selection of the glyphs and generates a similar single TTF output - which could serve as a replacement of Arial Unicode MS?

For web and standard desktop use - this is not required, but there are applications such as OpenGL games / maps / embedded devices, etc where a single font is extremely practical. Any hints where to start?

@roozbehp
Copy link
Contributor

On Thu, Jul 21, 2016 at 6:08 AM, Petr Pridal notifications@github.com
wrote:

Any hints where to start?

https://github.com/googlei18n/nototools/blob/master/nototools/merge_noto.py

@Naamani
Copy link

Naamani commented Dec 20, 2016

I used the script and it works great. The only problem is I can't add CJK (Simplified Chinese, Traditional Chinese, Japanese, and Korean) which I must. These are OTF files(not TTF), because of the many characters.
Is there a way to add a support for these languages as well, at least as Arial Unicode MS provides? We really wand to use NOTO instead of it.
Regards.

@c933103
Copy link

c933103 commented Apr 30, 2017

Can it be done in a format of Super OTC? Like in https://blogs.adobe.com/CCJKType/2017/04/three-multiple-family-super-otcs.html , different style of noto CJK fonts as well as source han fonts have been piut together as a single Super OTC font which contain hundreds of different fonts, I think that can also be done with numerous other noto fonts included?

@dougfelt
Copy link
Contributor

dougfelt commented May 1, 2017

OTC is a packaging format to put multiple fonts in a single file. To your operating system and apps it still looks like multiple fonts.

There is a hard maximum of 64K characters and 64K glyphs imposed by current standard font technology. All means for exceeding this limit rely on use of multiple fonts "under the covers" using an algorithmic font selection/fallback mechanism. If your application/operating system does not provide this mechanism, you cannot get around it by building a bigger font.

@c933103
Copy link

c933103 commented May 1, 2017 via email

@dougfelt
Copy link
Contributor

dougfelt commented May 1, 2017

It is not clear to me that OP was asking simply for different packaging. Recent discussion has been about creating a 'single ttf font' along the lines of Ariel Unicode MS, which is actually a single font. The problem there is we have both CFF and TT glyph outline data in our current fonts, and at different units-per-em. There can also be the issue of fonts for some scripts having a different ascent/descent, and how to resolve this acceptably. Merging them is not straightforward.

I don't believe there is any problem creating a TTC from mixed technology like this, though I haven't tried. We use Adobe's AFDKO tools (otf2otc). If this is acceptable perhaps OP can try that.

@satishchitimoju
Copy link

Hi,
Can anyone send the multi language arial font ttf file.

@davelab6
Copy link
Member

davelab6 commented Mar 23, 2018 via email

@ArchangeGabriel
Copy link

One problem of having so many font files is that when I try to select the font I want to use in any editor, I’ve got a very long list because of all the Noto files. I don’t know in which extent this could be solved, but it would be nice if that was possible.

I suppose that modifying the standard to go above 64k glyphs per font file is not possible?

@davelab6
Copy link
Member

Just noticed https://github.com/klokantech/klokantech-gl-fonts when searching Google.com for this issue - a fork of Noto with merged fonts :)

@ceztko
Copy link

ceztko commented Mar 29, 2019

I read this:

Instead, there will be a NotoSansSouthAsian font that will combine
the glyphs for supporting all South Asian languages/script plus have some basic Latin in it.

Is this region merging still planned?

@trojanobelix
Copy link

Sorry, I can not use it on my embedded system without a single ttf for all languages.
Any plans on it?

@brawer
Copy link
Contributor

brawer commented Apr 30, 2019

Try this script; also, see the comments earlier on this thread for forks with pre-built fonts.

@SinghS-ELS-CT
Copy link

When we use NotoSans-Bengali font. if we have english characters between Bengali language.it is not displaying correctly.it is showing as tofu.

@lamuertepeluda
Copy link

@brawer I tried that script and it is very buggy 😞 .
I am not a true expert with Python nor with fonts, but the requirements look somehow messy here, and I could not really find any instructions.

I am using Python 3.9.2 on Ubuntu 20.04.

Had also to rename gcc and g++ to gcc-5 and g++5 at some point (using ln -s)

sudo ln -s /bin/gcc /bin/gcc-5
sudo ln -s /bin/g++ /bin/g++-5

The closest I got to make it work was checking out commit fc6dec9dd74a00114ff11280333d3f5ded7c08a7 and then

pip3 install fontmake fonttools
python3  build_merged_noto.py

it started building stuff before getting this. With the latest commit it will break as soon as it starts, perhaps because some font was renamed.

  File "/home/linuxbrew/.linuxbrew/bin/fontmake", line 8, in <module>
    sys.exit(main())
  File "/home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/fontmake/__main__.py", line 482, in main
    project.run_from_glyphs(glyphs_path, **args)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/fontmake/font_project.py", line 700, in run_from_glyphs
    designspace_path = self.build_master_ufos(
  File "/home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/fontTools/misc/loggingTools.py", line 372, in wrapper
    return func(*args, **kwds)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/fontmake/font_project.py", line 169, in build_master_ufos
    designspace = glyphsLib.to_designspace(
  File "/home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/glyphsLib/builder/__init__.py", line 111, in to_designspace
    return builder.designspace
  File "/home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/glyphsLib/builder/builders.py", line 302, in designspace
    list(self.masters)  # Make sure that the UFOs are built
  File "/home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/glyphsLib/builder/builders.py", line 258, in masters
    self.to_ufo_glyph(ufo_glyph, layer, layer.parent)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/glyphsLib/builder/glyph.py", line 140, in to_ufo_glyph
    self.to_ufo_glyph_background(ufo_glyph, layer)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/glyphsLib/builder/glyph.py", line 314, in to_ufo_glyph_background
    new_glyph = ufo_layer.newGlyph(glyph.name)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/ufoLib2/objects/layer.py", line 296, in newGlyph
    raise KeyError(f"glyph named '{name}' already exists")
KeyError: "glyph named 'soSua-thai' already exists"
Traceback (most recent call last):
  File "/home/vito/Development/noto-source/build_merged_noto.py", line 178, in <module>
    build_family('NotoSerif')
  File "/home/vito/Development/noto-source/build_merged_noto.py", line 32, in build_family
    build_master(source)
  File "/home/vito/Development/noto-source/build_merged_noto.py", line 133, in build_master
    assert status == 0, 'command failed: %s' % command
AssertionError: command failed: fontmake -g src/NotoSerifThai-MM.glyphs -o ttf-interpolatable

A pity Google does not provide an already all-merged version of this font, since these python scripts (like most python code around the internet) are very hard to reproduce on different machines.

@satbyy
Copy link

satbyy commented Dec 12, 2021

This issue was created 6 years ago, yet we're here. So I took the matter into my own hands.

Announcing Go Noto Universal fonts! It provides pre-built, region-specific TTFs for South Asia, South East Asia, Middle East & Africa, and Europe-Americas. Also, the source code is included so that you can generate them yourself.

I've spent considerable time trying workarounds and merging the fonts. Hope you guys find it useful! Any feedback or issues, please comment in the other repo (not here).

Thanks,
Satish

@twardoch
Copy link

This is very useful, and uses the approach I was thinking of myself (per-region/script type merge). Very cool, many thanks for doing the research & work! I'll raise this with the Noto team.

@tqh28
Copy link

tqh28 commented Jan 14, 2022

This issue was created 6 years ago, yet we're here. So I took the matter into my own hands.

Announcing Go Noto Universal fonts! It provides pre-built, region-specific TTFs for South Asia, South East Asia, Middle East & Africa, and Europe-Americas. Also, the source code is included so that you can generate them yourself.

I've spent considerable time trying workarounds and merging the fonts. Hope you guys find it useful! Any feedback or issues, please comment in the other repo (not here).

Thanks, Satish

very very powerful,
many thank your effort

@metrey
Copy link

metrey commented Mar 30, 2022

Hi Akanksha,

We are planning on merging individual scripts/languages into merged fonts. 
However, there will not be one single giant NotoSans font. Instead, there will 
be a NotoSansSouthAsian font that will combine the glyphs for supporting all 
South Asian languages/script plus have some basic Latin in it.

Will this work for you?

Original comment by tha...@gmail.com on 12 Sep 2013 at 8:29

That would be good, is there way for us to select few font of different languages to merge ? such as Khmer, Chinese Simplify, English ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests