Open hajimehoshi opened 9 months ago
If this is downloading, I think it might be better in an utils package
Makes sense
Just in case, but did you consider a separate repository that contains Noto fonts for easy use with ebiten/text/v2
? Something along the lines of what I did with https://github.com/tinne26/fonts for etxt. In this case, you would do something like:
import "github.com/ebitengine/fonts/noto/xyz"
// ...
var face text.Face = xyz.StdFace(params) // and/or xyz.GoTextFace(params)
// ...
You wouldn't be able to cover "all languages", but it seems much safer. No runtime downloads, no risk of unnecessary redownloads, we are reusing the same types, etc. It seems to preserve most of the benefits without too many downsides? Unless you are thinking of dynamically handling any possible input language, of course. But even then, a notoface
repository that downloads dynamically and can return the GoTextFace
seems more convenient to avoid creating new types.
I didn't intend this feature for serious usages, so I didn't consider this idea. Let me think
Operating System
What feature would you like to be added?
I propose a new Face implementation
NotoFace
, which downloads necessary Noto font files on the fly. A user would be able to render any glyphs in any environments in theory.I think we can get a necessary face file names from the tool https://github.com/notofonts/nototools, but I am not 100% sure.
Why is this needed?
NotoFace
should be very useful for tests. This might be risky to use for productions.