[varlib] Add VarLibCFFHintTypeMergeError
This commit is contained in:
parent
8b568640c0
commit
aafc814088
@ -24,7 +24,7 @@ class VarLibCFFDictMergeError(VarLibMergeError):
|
||||
|
||||
|
||||
class VarLibCFFPointTypeMergeError(VarLibMergeError):
|
||||
"""Raised when a CFF glyph cannot be merged."""
|
||||
"""Raised when a CFF glyph cannot be merged because of point type differences."""
|
||||
|
||||
def __init__(self, point_type, pt_index, m_index, default_type, glyph_name):
|
||||
error_msg = (
|
||||
@ -35,5 +35,17 @@ class VarLibCFFPointTypeMergeError(VarLibMergeError):
|
||||
self.args = (error_msg,)
|
||||
|
||||
|
||||
class VarLibCFFHintTypeMergeError(VarLibMergeError):
|
||||
"""Raised when a CFF glyph cannot be merged because of hint type differences."""
|
||||
|
||||
def __init__(self, hint_type, cmd_index, m_index, default_type, glyph_name):
|
||||
error_msg = (
|
||||
f"Glyph '{glyph_name}': '{hint_type}' at index {cmd_index} in "
|
||||
f"master index {m_index} differs from the default font hint type "
|
||||
f"'{default_type}'"
|
||||
)
|
||||
self.args = (error_msg,)
|
||||
|
||||
|
||||
class VariationModelError(VarLibError):
|
||||
"""Raised when a variation model is faulty."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user