Compare commits
3
Commits
release/1.0.1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16b52e8fc7 | ||
|
|
a9d250944b | ||
|
|
14230bd489 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "glsl-glyphs"
|
name = "glsl-glyphs"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
description = "Generate GLSL ready glyph maps and usable functions "
|
description = "Generate GLSL ready glyph maps and usable functions "
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.14"
|
requires-python = ">=3.14"
|
||||||
|
|||||||
@@ -102,9 +102,11 @@ class Generator:
|
|||||||
try:
|
try:
|
||||||
self.target_sentences_path.parent.mkdir(parents=True, exist_ok=True)
|
self.target_sentences_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
self.target_sentences_path.write_text(content)
|
self.target_sentences_path.write_text(content)
|
||||||
self.log.info("Wrote sentences output to %s", self.target_path)
|
self.log.info("Wrote sentences output to %s", self.target_sentences_path)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
self.log.error(
|
self.log.error(
|
||||||
"Could not write sentences output file at: %s (%s)", self.target_path, e
|
"Could not write sentences output file at: %s (%s)",
|
||||||
|
self.target_sentences_path,
|
||||||
|
e,
|
||||||
)
|
)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
@@ -49,15 +49,15 @@ class Sentence:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def from_text(cls, src_text: str, names: list[str]) -> Sentence:
|
def from_text(cls, src_text: str, names: list[str]) -> Sentence:
|
||||||
text = src_text
|
text = src_text
|
||||||
if "EMPTY" in names:
|
|
||||||
text = text.replace(" ", "{EMPTY}")
|
|
||||||
else:
|
|
||||||
log.warning("No EMPTY tile in names, removing spaces in '%s'", src_text)
|
|
||||||
text.replace(" ", "")
|
|
||||||
changed = True
|
changed = True
|
||||||
data = []
|
data = []
|
||||||
remaining_text = ""
|
remaining_text = ""
|
||||||
while changed:
|
|
||||||
|
while changed and len(text):
|
||||||
|
if text[0] == " " and "EMPTY" in names:
|
||||||
|
text = text[1:]
|
||||||
|
data += [names.index("EMPTY")]
|
||||||
|
continue
|
||||||
changed = False
|
changed = False
|
||||||
min_name = None
|
min_name = None
|
||||||
min_pattern = None
|
min_pattern = None
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ requires-python = ">=3.14"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glsl-glyphs"
|
name = "glsl-glyphs"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "pillow" },
|
{ name = "pillow" },
|
||||||
|
|||||||
Reference in New Issue
Block a user