diff --git a/src/fontra_glyphs/backend.py b/src/fontra_glyphs/backend.py index 4180816..91db415 100644 --- a/src/fontra_glyphs/backend.py +++ b/src/fontra_glyphs/backend.py @@ -492,8 +492,6 @@ def _writeRawGlyph(self, glyphName, f): def getGlyphFilePath(self, glyphName): glyphsPath = pathlib.Path(self.gsFilePath) / "glyphs" - # TODO: Get the right glyph file name might be challenging, - # because for example the glyph A-cy is stored in the package as A_-cy.glyph realGlyphName = getGlyphspackageGlyphFileName(glyphName) return glyphsPath / (realGlyphName + ".glyph") diff --git a/src/fontra_glyphs/utils.py b/src/fontra_glyphs/utils.py index 5cef78f..12ba18b 100644 --- a/src/fontra_glyphs/utils.py +++ b/src/fontra_glyphs/utils.py @@ -3,6 +3,10 @@ def getGlyphspackageGlyphFileName(glyphName): + # Get the right glyph file name might be challenging, because for example + # the glyph "A-cy" is stored in the package as A_-cy.glyph. + # I could not find any documentation about this, yet. We may need to figure + # this out over time and extend the unittest. nameParts = glyphName.split("-") firstPart = ( f"{nameParts[0]}_"