Convert a .ttf to CBDT/CBLC format color font?
Rick Davies
Posts: 10
Hello Everyone,
This is my first post to Typedrawers, which kindly allowed me to
register--even though I confesed I'm not a proper type/font expert
or designer. Hopefully this is the right posting category?
Question
---------
Do any of you know of an easy-to-use tool for creating, or converting
to, a chromatic font in CBDT/CBLC format? That works on Windows?
(NotoColorEmoji.ttf is an example of a font in CBDT/CBLC format, tho'
more complicate than needed here. I've no idea about how that font was
created ...)
I've made a .ttf font with approx 80 chars, about half of which are
in the PUA. The glyphs are very simple: nearly all have outlines
comprising straight line segments only.
This font needs to be converted to the Google CBDT/CBLC format. (It
may not be coolest chromatic font format these days, but I'm stuck
with it.)
The starting point is a plain .ttf font, as above. The desired
end-point is an identical font, i.e. the same glyph/charset & the
same glyph shapes, with all the glyphs colored plain blue or red,
for example, in CBDT/CBLC format. No fancy shading, or mingled
colors, or anything: just the same single, uniform color applied to
every glyph in the font.
The ideal solution would be a converter, commercial or free, from
COLR/CPAL to CBDT/CBLC, or from plain .ttf to CBDT/CBLC. It must
work on Windows 7. Does such a tool exist?
AFAICS Transtype cannot convert from COLR/CPAL to CBDT/CBLC.
Failing this (very likely, I guess) can anyone recommend a
consultancy or font developer with the toolset and skills to
make this conversion? Or another list to post this plea for help?
This is a one-off, or two iterations at most, requirement.
FontLab itself may have the capability in one way or another, but
I can't go down that road, owing to license cost and learning
curve/time issues (that's my problem, not a criticism of FontLab).
Ditto wrt Adobe Illustrator, et al.
With thanks and regards,
Rick
This is my first post to Typedrawers, which kindly allowed me to
register--even though I confesed I'm not a proper type/font expert
or designer. Hopefully this is the right posting category?
Question
---------
Do any of you know of an easy-to-use tool for creating, or converting
to, a chromatic font in CBDT/CBLC format? That works on Windows?
(NotoColorEmoji.ttf is an example of a font in CBDT/CBLC format, tho'
more complicate than needed here. I've no idea about how that font was
created ...)
I've made a .ttf font with approx 80 chars, about half of which are
in the PUA. The glyphs are very simple: nearly all have outlines
comprising straight line segments only.
This font needs to be converted to the Google CBDT/CBLC format. (It
may not be coolest chromatic font format these days, but I'm stuck
with it.)
The starting point is a plain .ttf font, as above. The desired
end-point is an identical font, i.e. the same glyph/charset & the
same glyph shapes, with all the glyphs colored plain blue or red,
for example, in CBDT/CBLC format. No fancy shading, or mingled
colors, or anything: just the same single, uniform color applied to
every glyph in the font.
The ideal solution would be a converter, commercial or free, from
COLR/CPAL to CBDT/CBLC, or from plain .ttf to CBDT/CBLC. It must
work on Windows 7. Does such a tool exist?
AFAICS Transtype cannot convert from COLR/CPAL to CBDT/CBLC.
Failing this (very likely, I guess) can anyone recommend a
consultancy or font developer with the toolset and skills to
make this conversion? Or another list to post this plea for help?
This is a one-off, or two iterations at most, requirement.
FontLab itself may have the capability in one way or another, but
I can't go down that road, owing to license cost and learning
curve/time issues (that's my problem, not a criticism of FontLab).
Ditto wrt Adobe Illustrator, et al.
With thanks and regards,
Rick
0
Comments
-
FontLab VI can do this, including converting from one color format to the other.
If you have a separate input font for each of your two colors, AFAIK you could create such a font with TransType 4 as well.0 -
Thanks very much Thomas for the info about FontLab.
I've just read Adam Twardoch's great post:
https://blog.fontlab.com/font-tech/color-fonts/color-font-format-proposals/
which provides confidence that FontLab should be able to do the
job, before breakfast probably. I'd skipped that article, as it seemed
too old. How wrong I was!
What would be the best site to post a job offer for this work,
do you think? It would need to be a site where FontLab experts lurk.
(Apologies if the answer is obvious to type experts--it's an unfamiliar
world for me.) I may need to do the conversion twice. And I need to
check if the CBDT/CBLC format is 'resilient' between different screen
resolutions including HiDpi.
0 -
If your idea doesn't involve manual work, it would probably be easier to script it in Python with FontTools instead of using a graphical editor. You would just need to find someone who has experience with FontTools and the CBDT table, these different table formats can be quite special. It's not like if you know one table, you can script all1
-
The catch is that a vector format doesn't give any clues as to what your desired output resolutions might be in the bitmap formats. So converting in that direction may be troublesome if the process doesn't give you control over resolutions. (FontLab VI does not yet, I don't think. TBD.)0
-
Thanks both. I'm sliding backwards down the slope of understanding!
My starting point was installing the Noto Color Emoji font. It provided an
illustration of a solution to the problem I'm trying to solve (for a
colleague who's developing a GUI app on Windows using Qt).
There's more b/g info here. (More than I was hoping ever to know!)
https://rawgit.com/behdad/color-emoji/master/specification/v1.html
https://www.microsoft.com/typography/otspec/eblc.htm
Noodling around a ttx dump of the NotoColorEmoji.ttf, *very* amateurishly,
it would seem this CBDT/CBLC font:
- Only has one strike. Only one set of strikedata, at anyrate.
- All bitmap chars have ppemY and ppemX set to 109.
- Only uses imageFormat 17
My already-drawn font comprises roughly 40 glyphs (2x more codepoints),
all very simple shapes, intended for use as special-character indicators--
to indicate the presence of typographic spaces, ZWSP, ZWNJ, WJ, PDF, and
so on, as you see in most text processing GUIs. It should result in a small
CBDT/CBLC font, relatively speaking.
So, based on the foregoing, there should be no huge problem in automating
the conversion from a non-CBDT/CBLC .ttf to a CBDT/CBLC .ttf. First, I guess,
generate a set of PNGs from the .ttf outlines, each with the same height,
ppemX/Y values; but different width, left/right bearing, and AW values,
automatically derived pro-rata from the values in the original .ttf.
Alternatively, FontCreator easily makes a CPAL version of the font, which
could be used as the starting point.
The FontLab forums have a 'Jobs' category. So I'll head over there to see if
anyone is willing to try some paid-for experimentation. And leave you all in
peace for now.
Thanks very much for your interest and advice so far. I'll report back
if/when I make progress on this.
0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 803 Font Technology
- 1K Technique and Theory
- 622 Type Business
- 444 Type Design Critiques
- 542 Type Design Software
- 30 Punchcutting
- 137 Lettering and Calligraphy
- 84 Technique and Theory
- 53 Lettering Critiques
- 485 Typography
- 303 History of Typography
- 114 Education
- 68 Resources
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 270 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports