-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from fonttools/writer
Implement writer
- Loading branch information
Showing
18 changed files
with
1,018 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools", | ||
"wheel", | ||
"wheel == 0.31.1", | ||
"cython >= 0.28.5", | ||
] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
from .parser import load, loads, ParseError | ||
from .writer import dump, dumps | ||
|
||
try: | ||
from ._version import version as __version__ | ||
except ImportError: | ||
__version__ = "0.0.0+unknown" | ||
|
||
|
||
__all__ = ["load", "loads", "ParseError"] | ||
__all__ = ["load", "loads", "dump", "dumps", "ParseError"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#cython: language_level=3 | ||
|
||
from cpython cimport array | ||
from libc.stdint cimport uint16_t, uint32_t | ||
|
||
|
||
cdef extern from "<ctype.h>": | ||
int isxdigit(int c) | ||
int isdigit(int c) | ||
int isprint(int c) | ||
|
||
|
||
cdef unicode tounicode(s, encoding=*, errors=*) | ||
|
||
|
||
cdef tostr(s, encoding=*, errors=*) | ||
|
||
|
||
cdef array.array unicode_array_template | ||
|
||
|
||
cdef bint is_valid_unquoted_string_char(Py_UNICODE x) | ||
|
||
|
||
cdef bint PY_NARROW_UNICODE | ||
|
||
|
||
cdef bint is_high_surrogate(uint32_t ch) | ||
|
||
|
||
cdef bint is_low_surrogate(uint32_t ch) | ||
|
||
|
||
cdef uint32_t unicode_scalar_from_surrogates(uint16_t high, uint16_t low) | ||
|
||
|
||
cdef uint16_t high_surrogate_from_unicode_scalar(uint32_t scalar) | ||
|
||
|
||
cdef uint16_t low_surrogate_from_unicode_scalar(uint32_t scalar) |
Oops, something went wrong.