Closed derekdreery closed 3 years ago
I guess there might be an issue around what dynamic functionality you would be willing to support. If this library computes information about fonts eagerly and non-incrementally, then adding a new font could be a very expensive operation, requiring a rebuild of a lot of things. I still think its worth having the methods in that case, with a caveat in the docs that they should be avoided if possible.
I've also added https://github.com/derekdreery/font-kit/tree/multi_downcast to get at a MemSource
dynamically for my needs. I don't want to open loads of PRs at the same time, but would invite comments on it.
@bors-servo r+ Looks good!
:pushpin: Commit 258a4da has been approved by jdm
:hourglass: Testing commit 258a4dadadac2005c46da8b882337440bbdafbd6 with merge 4b1ede011ff407e947c965942662dc0a177d9bd0...
:sunny: Test successful - checks-travis Approved by: jdm Pushing 4b1ede011ff407e947c965942662dc0a177d9bd0 to master...
This PR adds a method that allows a
MemSource
to be extended dynamically after creation. It is useful when implementing an interface that assumes this is possible (for me, the motivating interface is in https://github.com/linebender/piet).