Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text proposal bitmap fonts? #53

Open
meshula opened this issue Apr 14, 2024 · 2 comments
Open

Text proposal bitmap fonts? #53

meshula opened this issue Apr 14, 2024 · 2 comments
Labels
text Supporting text primitives

Comments

@meshula
Copy link
Member

meshula commented Apr 14, 2024

on #48 :

bitmap fonts. sdf fonts take a while to generate at good quality, and people may wish to provide atlased fonts directly. I think we should explore a bitmapped atlassed font scheme, potentially as a schema. This would involve a texture reference for the atlassed font, coordinates into the atlas per glyph, basic metrical information, and a kerning table. There are a spectrum of use cases, ranging from elementary labeling to bidi multilingual annotations, and a variety of font technologies, and I think we should accommodate the fact that rendering text is not just the whole enchilada or nothing :)

@dsyu-pixar dsyu-pixar added the text Supporting text primitives label Apr 15, 2024
@PierreWang
Copy link
Contributor

I think the atlas font can be achieved using the text renderer plugin in our proposal. For example, a FontAtlasRenderer can have a big texture for each required font and put the characters in the texture (assume no CJK characters). When we are generating information for a text string, it will ask the FontAtlasRenderer to provide the texture coordinate for each character. The FontAtlasRenderer will put the required glyph into the big texture and return the coordinate for each character.
Then in the usda file, we can specify the font name at the place of texture asset URI, such as "texttexture://Font:/Arial/Bold/True&Font:/Consolas&Font:/Calibri/Italic/True". The TextTextureResolver will know that there are three fonts, and it will ask the FontAtlasRenderer to provide the three textures for the fonts. The three textures can be put into a texture array. Then the texture array will be set as the texture resource of the shader.

@meshula
Copy link
Member Author

meshula commented Apr 17, 2024

I like the sound of that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
text Supporting text primitives
Projects
Status: Update
Development

No branches or pull requests

3 participants