mirror of
https://git.planet-casio.com/Lephenixnoir/fxsdk.git
synced 2024-12-28 04:23:37 +01:00
fxconv: preliminary support for fonts in PythonExtra
This commit is contained in:
parent
2acc439ed4
commit
4c307af02b
1 changed files with 13 additions and 0 deletions
|
@ -807,6 +807,19 @@ def convert_topti(input, params):
|
|||
# Object file generation
|
||||
#---
|
||||
|
||||
if params["py"]["enabled"]:
|
||||
l = [ "import gint\n",
|
||||
f"{params['name']} = gint.font({title or None}, {flags}, ",
|
||||
f"{line_height}, {grid.h}, {len(blocks)}, {glyph_count}, ",
|
||||
f"{char_spacing}, ",
|
||||
data_blocks,
|
||||
data_glyphs ]
|
||||
if proportional:
|
||||
l += [data_index, data_width]
|
||||
else:
|
||||
l += [f"{grid.w}, {(grid.w * grid.h + 31) >> 5}"]
|
||||
return l + [")\n"]
|
||||
|
||||
# Base data: always put the raw data and blocks first since they are
|
||||
# 4-aligned, to preserve alignment on the rest of the references.
|
||||
o = ObjectData()
|
||||
|
|
Loading…
Reference in a new issue