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
Great, which FontData does it want? Pity it's not apparent from type but that's OK, the comment will help right?
/// A dynamically resolving wrapper for [`base_anchor_offsets`][Self::base_anchor_offsets].pubfnbase_anchors(&self,data:FontData<'a>,) -> ArrayOfNullableOffsets<'a,AnchorTable<'a>,Offset16>{let offsets = self.base_anchor_offsets();ArrayOfNullableOffsets::new(offsets, data,())}
To be fair you can tell the answer from the spec but it's a bit tiresome. It would be nice to make it easier. At the very least add comments to these methods that say where to get the correct FontData. Bonus points for having types so you can't pass the wrong one without making an effort.
For context see googlefonts/fontc#492 GPOS tests such as compile_basic_gpos_mark_base.
The text was updated successfully, but these errors were encountered:
the methods like base_anchors were added later, to try and simplify things, and they get their own docs that just point to the method they are wrapping. It should be easy enough to update those to provide a bit more elucidation.
base_anchors does simplify things, it just needs a tiny bit of help to make it obvious what to pass it (if we have to pass it something, as a user I would prefer it didn't but I appreciate that's fiddly)
Suppose you want to loop over your base anchors to see their coordinates. It's a bit more indirect than you'd hoped but np. And then you hit this:
Great, which FontData does it want? Pity it's not apparent from type but that's OK, the comment will help right?
To be fair you can tell the answer from the spec but it's a bit tiresome. It would be nice to make it easier. At the very least add comments to these methods that say where to get the correct FontData. Bonus points for having types so you can't pass the wrong one without making an effort.
For context see googlefonts/fontc#492 GPOS tests such as compile_basic_gpos_mark_base.
The text was updated successfully, but these errors were encountered: