koron / bdf2ttf Goto Github PK
View Code? Open in Web Editor NEWConvert BDF font file to TTF (embed bitmap as is, not conver to vector)
License: MIT License
Convert BDF font file to TTF (embed bitmap as is, not conver to vector)
License: MIT License
Hello, every time I try to convert a font with this line bdf2ttf.exe test.ttf info.ini some-font.bdf
, I get this error: Didn't specify Fontname in test.ttf.
What am I doing wrong? Thanks.
When I check the converted file, I can see that all the glyphs are stuck at the bottom, as shown in the screenshot.
And If I convert a BDF file other than this BDF file, it has been confirmed that it looks normal. (ex. GNU Unifont)
Here is header of my BDF file. What could be the problem?
STARTFONT 2.1
FONT -Galmuri11-Regular-R-Regular--16-16-75-75-c-80-iso10646-1
SIZE 16 75 75
FONTBOUNDINGBOX 18 19 -1 -3
STARTPROPERTIES 10
FAMILY_NAME Galmuri11
WEIGHT_NAME Regular
FONT_VERSION Version 2.0.2
COPYRIGHT Copyright (c) 2019-2022 Lee Minseo ([email protected])
FOUNDRY Made with Bits'n'Picas by Kreative Software
FONT_ASCENT 14
FONT_DESCENT 2
CAP_HEIGHT 12
POINT_SIZE 12
X_HEIGHT 8
ENDPROPERTIES
CHARS 12947
Hello,
After installing TTF files generated by bdf2ttf (provided by you in issue #1) under Windows 7, I observed:
There is too much space between each glyph. 😰 Is there a way to correct this? Perhaps in the INI file?
Thanks for your consideration.
Google検索でbdf2ttfのバージョン2.1(最新アップデート:2014年12月21日)を見つけました。
(Eng: I found version 2.1 of bdf2ttf (Recent Update: 21-Dec-2014) in Google search.)
http://www.ns2.orangetide.com/OLD/src/bdf2ttf-2.1/
http://www.ns2.orangetide.com/OLD/src/bdf2ttf-2.1.zip
ここのbdf2ttfと比べると以前のアップデートです。
README_j.txtには次の内容が含まれています。
(Eng: It's a previous update compared to bdf2ttf here.
And the following contents are included in README_j.txt.)
-g, --glyph-offset プロポーショナルフォントを生成します。
-f, --unicode-full Unicode BMP外(CJK Ext. Bなと)のフォント用のスイッチ。
● 21-Dec-2014 (2.1)
Unicode BMP外(CJK Ext. Bなと)のフォント用のスイッチ(-f)を追加。
(2.0.1)プロポーショナルフォントを生成します(-p)。
さらに、bdf.cにはKSX1001が含まれており、ucstable.dフォルダにはKSX1001ファイルが含まれています。
(Eng: In addition, bdf.c contains KSX1001 and the ucstable.d folder contains KSX1001 file.)
しかし、ここGitHubのbdf2ttfはより最近のアップデート(2015年4月6日-)であるにもかかわらず、上記のすべての内容は削除されました。 何が違うんですか? それらはどのような理由ですべて除去されましたか?
(Eng: However, even though the bdf2ttf here in GitHub is a more recent update (06-Apr-2015), everything mentioned above has been removed. What's the difference? For what reason were they all removed?)
At first, I tried converting a minimal handwritten file. bdf2tff
didn't emit any error messages but produced an invalid font. I tried converting this font and still got no error messages but an invalid ttf file. This is the debug output.
Input files:
cherry.bdf
bdf2_load: size=10
bdf2_load: create a font size 10
bdf_load: encoding is 8859-1
bdf2_load: numGlyph=191
bdf2_get_count()=1
n_coresize=10
emX=1024
emY=1024
emAscent=1024
emDescent=0
bdf2_t.sizelist:
10: w=6 h=10 ascent=8 descent=2
The name
and sbit
tables of the resulting ttf files are invalid somehow. That's all I know. Maybe the bdf file is invalid? Could you provide me with a minimal bdf file with just one glyph that produces a valid ttf file?
|_ noto.fnt
| |_ noto.png
|_ noto.bdf
Hello,
I tried using bdf2ttf to transform the Tamzen font into TTF, but when I double-click on the resulting TTF file under Windows 7, an error dialog appears saying "Windows Font Viewer: The requested file ... is not a valid font file.". Similarly, I'm getting an error message when opening the resulting TTF file in FontForge under Linux: 😞
In the above screenshot, that "|0003|" Unicode glyph at the end of the font name is suspicious.
$ mkdir -p ~/.fonts/tamzen-font
$ git clone https://github.com/sunaku/tamzen-font ~/.fonts/tamzen-font
$ cd ~/.fonts/tamzen-font
$ git checkout bdf2ttf
$ cat ttf/TamzenForPowerline.ini
Fontname = TamzenForPowerline
Version = 1.11.5
Copyright = Copyright
Trademark = Trademark
$ bdf2ttf ttf/TamzenForPowerline-regular.ttf ttf/TamzenForPowerline.ini bdf/TamzenForPowerline*r.bdf
Input files:
bdf/TamzenForPowerline5x9r.bdf
bdf/TamzenForPowerline6x12r.bdf
bdf/TamzenForPowerline7x13r.bdf
bdf/TamzenForPowerline7x14r.bdf
bdf/TamzenForPowerline8x15r.bdf
bdf/TamzenForPowerline8x16r.bdf
bdf/TamzenForPowerline10x20r.bdf
$ bdf2ttf -b ttf/TamzenForPowerline-bold.ttf ttf/TamzenForPowerline.ini bdf/TamzenForPowerline*b.bdf
Input files:
bdf/TamzenForPowerline5x9b.bdf
bdf/TamzenForPowerline6x12b.bdf
bdf/TamzenForPowerline7x13b.bdf
bdf/TamzenForPowerline7x14b.bdf
bdf/TamzenForPowerline8x15b.bdf
bdf/TamzenForPowerline8x16b.bdf
bdf/TamzenForPowerline10x20b.bdf
$ fontforge ttf/TamzenForPowerline-regular.ttf
... now observe the error shown in the screenshot above ...
Thanks for your consideration. 😅
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.