Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/ext/native/tools/README.txt
3189 views
1
These are simple tools to create the ZIM texture format and texture atlases based on it.
2
3
atlastool <configuration_file> <filename_prefix> <format>
4
5
<configuration_file> path to the configuration file for the atlas to be generated
6
description of the format is below
7
8
<filename_prefix> the prefix of the output files, the output files will be:
9
<filename_prefix>_atlas.zim
10
<filename_prefix>_atlas.cpp
11
<filename_prefix>_atlas.h
12
13
<format> texture format of the atlas, can be:
14
8888 - RGBA8
15
etc1 - ETC1 compressed
16
<none> - uses RGBA4444
17
18
Basic configuration file format look like this:
19
20
<size>
21
font <fontname> <fontpath> <glyphregions> <height> [<vertical offset>]
22
image <symbolname> <imagepath> <action>
23
24
All the blocks enclosed with "<" ">" need to be replaced with the respective options, for
25
example one line in one of out configuration files is:
26
27
font UBUNTU24 C:/Windows/Fonts/KozGoPro-Medium.otf UWkhcsGR 24
28
29
<size> size is the horizontal size of the atlas, should be a power of 2, the vertical size is
30
automatically adjusted to be smallest power of 2 that can fit the whole atlas.
31
32
<fontname> the name of the font in the generated *.h and *.cpp files
33
34
<fontpath> path to the font, can use *.otf and *.ttf fonts
35
36
<glyphregions> defines which glyphs should be copied into the atlas, can use any combination
37
of the following:
38
U - Basic Latin (US ASCII)
39
W - Latin-1 Supplement
40
E - Latin Extended-A (various European languages, Slavic, Hungarian, Romanian, Turkish, etc.)
41
e - Latin Extended-B (additions for European languages, some Romanized African and Asian languages)
42
G - Greek and Coptic
43
R - Cyrillic (Russian, Bulgarian, etc.)
44
H - Hebrew
45
S - Select symbols
46
k - Katakana
47
h - Hiragana
48
J - Shift JIS (for Japanese fonts)
49
c - All Kanji, filtered though!
50
T - Thai
51
K - Korean (hangul)
52
V - Vietnamese (needs 'e' too)
53
54
<height> height in pixels of the glyphs in the font atlas
55
56
<vertical offset> ??? no idea
57
58
<symbolname> name of this symbol in the generated *.h and *.cpp files
59
60
<imagepath> path to the image file that is going to be used
61
62
<action> can be any of:
63
copy - copies the image as-is
64
r2a - red2alpha, red channel to alpha, color is a solid while
65
r2i - red to intensity, full alpha
66
pre - premultiply alpha
67
p2a - pink (255,0,255) to alpha
68
69