mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
[fpdf2] Make fpdf.fonts.Glyph a dataclass (#13645)
This commit is contained in:
@@ -10,3 +10,7 @@ fpdf.fonts.HarfBuzzFont
|
||||
|
||||
# Stubtest wants us to use Literals, but that is unreasonable.
|
||||
fpdf.unicode_script.UNICODE_RANGE_TO_SCRIPT
|
||||
|
||||
# Ignore stubtest weirdness "fpdf.fonts.Glyph._DT is not present at runtime"
|
||||
# https://github.com/python/mypy/issues/18811
|
||||
fpdf.fonts.Glyph._DT
|
||||
|
||||
@@ -118,19 +118,13 @@ class PDFFontDescriptor(PDFObject):
|
||||
font_name: Incomplete
|
||||
def __init__(self, ascent, descent, cap_height, flags, font_b_box, italic_angle, stem_v, missing_width) -> None: ...
|
||||
|
||||
@dataclass(order=True)
|
||||
class Glyph:
|
||||
glyph_id: int
|
||||
unicode: tuple[Incomplete, ...]
|
||||
glyph_name: str
|
||||
glyph_width: int
|
||||
def __hash__(self): ...
|
||||
def __init__(self, glyph_id, unicode, glyph_name, glyph_width) -> None: ...
|
||||
def __lt__(self, other): ...
|
||||
def __gt__(self, other): ...
|
||||
def __le__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
|
||||
__match_args__ = ("glyph_id", "unicode", "glyph_name", "glyph_width")
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class SubsetMap:
|
||||
font: TTFFont
|
||||
|
||||
Reference in New Issue
Block a user