pyhershey.glyph_view

Module Contents

Classes

GlyphView

Class contains glyph info. See https://developer.apple.com/library/archive/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/TypoFeatures/TextSystemFeatures.html

class pyhershey.glyph_view.GlyphView(index: int, database_item: Dict[str, Any])[source]

Class contains glyph info. See https://developer.apple.com/library/archive/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/TypoFeatures/TextSystemFeatures.html for definition of the provided glyph metrics.

clone(self, reset: bool = False)pyhershey.glyph_view.GlyphView[source]

Clone a GlyphView.

Parameters

reset (bool, optional) – if False, the current font size is inhereted and otherwise set to 1. Default to False.

property index(self)int

glyph index

property segments(self)Tuple

Tuple: segments of the glyph scaled to current font size.

property bounding_box(self)Tuple[Tuple[float, float], Tuple[float, float]]

Tuple[Tuple[float, float], Tuple[float, float]]: bounding box (lower left, upper right) scaled to current font size.

property width(self)float

float: width of bounding box scaled to current font size

property height(self)float

float: height of bounding box scaled to current font size

property left_bearing(self)float

float: leaft bearing scaled to current font size

property right_bearing(self)float

float: right bearing scaled to current font size

property ascent(self)float

float:ascent scaled to current font size

property descent(self)float

float: descent scaled to current font size

property advance_width(self)float

float: advance width scaled to current font size

property font_size(self)

float: font size