text: add android portability notice to NewShaper

NewShaper cannot be called prior to opening an application window on Android unless
the application does not want system font support. Add a note to this effect to the
constructor.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
Chris Waldon
2023-08-07 09:50:34 -04:00
committed by Elias Naur
parent 05f0dc2513
commit 03c21dc1b5
+5 -2
View File
@@ -245,8 +245,11 @@ func WithCollection(collection []FontFace) ShaperOption {
}
}
// NewShaper constructs a shaper with the provided collection of font faces
// available.
// NewShaper constructs a shaper with the provided options.
//
// NewShaper must be called after [app.NewWindow], unless the [NoSystemFonts]
// option is specified. This is an unfortunate restriction caused by some platforms
// such as Android.
func NewShaper(options ...ShaperOption) *Shaper {
l := &Shaper{}
for _, opt := range options {