CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/ext/native/tools/README.txt
Views: 1401
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 - US ASCII
39
W - Latin-1 extras 1
40
E - Latin-1 Extended A (needed for Hungarian etc)
41
e - Latin-1 Extended B (for some African and latinized asian languages?)
42
k - Katakana
43
h - Hiragana
44
s - ShiftJIS symbols
45
H - Hebrew
46
G - Greek
47
R - Russian
48
c - All Kanji, filtered though!
49
T - Thai
50
K - Korean (hangul)
51
52
<height> height in pixels of the glyphs in the font atlas
53
54
<vertical offset> ??? no idea
55
56
<symbolname> name of this symbol in the generated *.h and *.cpp files
57
58
<imagepath> path to the image file that is going to be used
59
60
<action> can be any of:
61
copy - copies the image as-is
62
r2a - red2alpha, red channel to alpha, color is a solid while
63
r2i - red to intensity, full alpha
64
pre - premultiply alpha
65
p2a - pink (255,0,255) to alpha
66
67