You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an instance record, the postscript name ID is optional. postscript_name_id is therefore typed as Option<NameId>. All good.
However, in the binary, the "not present" case is represented as binary 0xFFFF. When the postscript name ID is not present, both skrifa NamedInstance.postscript_name_id and read-fonts InstanceRecord.post_script_name_id do not return None but instead return Some(65535) - so in fact this Option always returns Some.
I feel that certainly in skrifa as a "mid-level" library, and possibly also in read-fonts, the "not-present" case should be interpreted from the binary value and returned as a None.
The text was updated successfully, but these errors were encountered:
In an instance record, the postscript name ID is optional.
postscript_name_id
is therefore typed asOption<NameId>
. All good.However, in the binary, the "not present" case is represented as binary
0xFFFF
. When the postscript name ID is not present, both skrifaNamedInstance.postscript_name_id
and read-fontsInstanceRecord.post_script_name_id
do not returnNone
but instead returnSome(65535)
- so in fact thisOption
always returnsSome
.I feel that certainly in skrifa as a "mid-level" library, and possibly also in read-fonts, the "not-present" case should be interpreted from the binary value and returned as a
None
.The text was updated successfully, but these errors were encountered: