aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/fonttools/fontTools/ttLib/tables/D__e_b_g.py
blob: 54449a5fd6e39c695af425a5523ecc231aa3c474 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import json

from . import DefaultTable


class table_D__e_b_g(DefaultTable.DefaultTable):
    def decompile(self, data, ttFont):
        self.data = json.loads(data)

    def compile(self, ttFont):
        return json.dumps(self.data).encode("utf-8")

    def toXML(self, writer, ttFont):
        writer.writecdata(json.dumps(self.data, indent=2))

    def fromXML(self, name, attrs, content, ttFont):
        self.data = json.loads(content)