refactor: add default_font, change font api#66
Conversation
7e7764d to
4b4c76d
Compare
DJMcNab
left a comment
There was a problem hiding this comment.
We need to make sure we're handling the licensing properly.
Can we ask the Bevy project to make a crate containing just the font file, so that the usages can be properly shared?
There was a problem hiding this comment.
What's the license for this file?
There was a problem hiding this comment.
If you are using both this crate with default_font and bevy/default_font, does your binary include both?
I do see that the file is relatively small, so it's probably fine.
There was a problem hiding this comment.
We aren't currently using bevy/default_font, not until bevyengine/bevy#14406 is merged at least.
|
We're good - see We recently submitted a PR to expose the font data under current licensing. Which is approved, waiting merge. So we will switch to that as soon as we can. |
|
I don't agree with @alice-i-cecile's reading of the OFL in bevyengine/bevy#8445. According to their FAQ:
I can't find the license text within the font file (at least using So we should either just remove this file and only use the capability from that PR, or add the OFL. |
I always planned on switching with the data from the PR, however I am not opposed to adding the OFL sooner until we can do that. I'd gladly accept a PR to add the OFL. |
# Objective - Enables use cases where third-party crates would want to use the default font as well [see linebender's use](linebender/bevy_vello#66) ## Solution - Uses `include_bytes` macro and make it `pub` --------- Co-authored-by: Spencer C. Imbleau <spencer@imbleau.com> Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>
Added
default_fontfeature that uses the sameFiraMono-subset.ttffont used in the bevy/default_font feature.Changed
examples/textfor further usage. This is to prepare for additional text features such as linebreak behavior, bounded text, and text justification.VelloTexthas been renamed toVelloTextSection.VelloText.contenthas been renamed toVelloText.value.VelloTextStylestruct and it is a required field ofVelloText.VelloFonthas been removed fromVelloTextBundleand moved intoVelloTextStyle.