Skip to content

Commit

Permalink
change get_table_blob → reference_table
Browse files Browse the repository at this point in the history
  • Loading branch information
mcratt committed Dec 19, 2024
1 parent 8678b0a commit 0807dc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/uharfbuzz/_harfbuzz.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ cdef class Face:
raise MemoryError()
return Blob.from_ptr(blob)

def get_table_blob(self, tag: str) -> Blob:
def reference_table(self, tag: str) -> Blob:
cdef bytes packed = tag.encode()
cdef hb_tag_t hb_tag = hb_tag_from_string(<char*>packed, -1)
cdef hb_blob_t* blob = hb_face_reference_table(self._hb_face, hb_tag)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_uharfbuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def test_list_names_with_user_names(self, mutatorsans):
"MutatorMathTest-Medium_Narrow_I",
]

def test_get_table_blob(self, blankfont):
def test_reference_table(self, blankfont):
head_format = {
# (offset, length, type)
"majorVersion": (0, 2, "H"), # uint16
Expand Down Expand Up @@ -885,7 +885,7 @@ def parse_table(table_bytes, table_name: str, tag_filter=None):

face = blankfont.face
if "OS/2" in face.table_tags:
blob = face.get_table_blob("OS/2")
blob = face.reference_table("OS/2")

table_data_filter = parse_table(blob.data, "OS/2", ["usWeightClass", "fsSelection"])
assert table_data_filter["usWeightClass"] == 400
Expand Down Expand Up @@ -933,7 +933,7 @@ def parse_table(table_bytes, table_name: str, tag_filter=None):
'usUpperOpticalPointSize': 0}

if "head" in face.table_tags:
blob = face.get_table_blob("head")
blob = face.reference_table("head")

table_data_filter = parse_table(blob.data, "head", ["macStyle"])
assert table_data_filter["macStyle"] == 0
Expand Down

0 comments on commit 0807dc8

Please sign in to comment.