Re: How to generate fonts

Posted by mojavelinux on
URL: https://discuss.asciidoctor.org/How-to-generate-fonts-tp2358p2627.html

Rei,

> I found some characters are missing:

If there are characters missing, just take out the following line from the fontforge script:

----
# select lesser range of glyphs
SelectMore(0u0020,0uffee)
SelectInvert()
Clear()
SelectNone()
----

> I think convert otf font to ttf maybe no a good idea

I think the problem is just that we shouldn't cut characters from the font until we know what we are cutting. I think the conversion from otf is working fine (well, there might be some side effects, but it isn't causing the missing glyphs).

These lines are cutting characters out of the font in an attempt to reduce the file size a bit. It's not necessary to do so.

> DroidSansFallbackFull.ttf is using in Ubuntu and old versions Android for cjk, it look acceptable in my document.

Yes, this is safe and indeed was my intention to have this supported in Asciidoctor PDF since PDF requires that you specify a font for every character (unlike a web browser). I saw your pull request, so I'll test that and merge it in. Thanks!

> I found English and Japaness support (in the M+ font), no Chinese and Korea, am I missing something?

I think the website is outdated. If you clone the repository, then you should see that you get all the characters. They are also packaged for Fedora and Ubuntu, so you can get them that way (see http://packages.ubuntu.com/trusty/fonts-mplus).

> The perfect solution is directly support otf font in prawn, than editor can use the best font for his/her document, but I don't know how to write a otf parse for prawn.

Neither do I and I'm not going to count on it happening any time soon. The best solution is to get a good set of TTF fonts that we can rely on and make sure they are well integrated in Asciidoctor PDF.

Cheers,

-Dan


On Thu, Jan 1, 2015 at 2:12 AM, chloerei [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks for your works.

I tried this script, and use the result font in project, but I found some characters are missing:

[source, asciidoc]
----
=== 环境变量

现在来了解一下什么是环境变量,以及如何设置环境变量。

环境变量是进程启动的时候由操作系统设置的一组变量。操作系统在启动的时候已经定义了一些环境变量,可以用 `env` 命令来查阅:
----

Compare DroidSansFallbackFull.ttf and DroidSansFallbackFull.ttf result





I think convert otf font to ttf maybe no a good idea, it bring many issuses, unless understand the whole font's detail, but it take too much time.

DroidSansFallbackFull.ttf is using in Ubuntu and old versions Android for cjk, it look acceptable in my document.(it missing some uncommon charsets, so Noto born). The perfect solution is directly support otf font in prawn, than editor can use the best font for his/her document, but I don't know how to write a otf parse for prawn.

I search M+ font (http://mplus-fonts.sourceforge.jp/), I found English and Japaness support, no Chinese and Korea, am I missing something?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-to-generate-fonts-tp2358p2626.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--