Skip to content

Commit

Permalink
Write UFO .glif note as CDATA (#15)
Browse files Browse the repository at this point in the history
Allows round-tripping through FontForge.

Closes #15.
  • Loading branch information
ctrlcctrlv committed Aug 16, 2022
1 parent 06e25bc commit 8e82ff2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/sfdLib/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from datetime import datetime
from fontTools.misc.fixedTools import otRound
from lxml.etree import CDATA
import sfdutf7

SFDReadUTF7 = lambda s, force_valid_xml=True: sfdutf7.decode(
Expand Down Expand Up @@ -738,7 +739,7 @@ def _parseChar(self, data):
pass # XXX
elif not self._minimal:
if key == "Comment":
glyph.note = SFDReadUTF7(value)
glyph.note = CDATA(SFDReadUTF7(value))
elif key == "Colour":
glyph.markColor = _parseColor(int(value, 16))

Expand Down

0 comments on commit 8e82ff2

Please sign in to comment.