You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main reason I originally used it at all was text rendering with built-in fonts, but in the long run I want user-defined fonts, built-in fonts with higher coverage, and 3D text (see Text rendering #424).
We still haven't succeeded at fully correct e-g-2D/aic-3D coordinate and bounding box conversion under arbitrary transforms. This is not fundamentally hard; it's just easy to get wrong.
Using 2D drawing primitives discourages us from taking advantage of 3D.
Aesthetic complaint: Docs get cluttered with all of the blanket traits from az.
Therefore, I believe we should replace e-g. Its current usage is:
Rendering:
Info text overlay
Writing pixels to the image in raytrace_to_texture
Text in the world:
Evaluating Primitive::Text.
Drawing text inside make_some_voxel_blocks() (601910d)
Implement raytrace_to_texture directly (perhaps with the help of imgref), without e-g involved.
Change button icon text to be real icons or text labels.
Replace Icons::Delete with an image file.
Replace light test card with an image file.
Replace button shapes with image files.
Use Primitive::Text for make_some_voxel_blocks().
Replace all direct text rendering with Primitive::Text or (for large text) a way to ask our own fonts to draw into a SpaceTransaction or for their pixels (for info text overlay).
Delete (or make private) draw_target() methods.
Replace implementation of text rendering (with what?).
Remove embedded-graphics entirely.
Open questions:
Should our new text renderer be from scratch or is there another library that we can use? I don't have notes from the previous library search.
The text was updated successfully, but these errors were encountered:
This removes one of the direct uses of `embedded_graphics`.
See <#528>.
A disadvantage is that now evaluating the block is more expensive. We
could fix that by adding a `BlockDef` wrapper, or by making a way to
turn a `Block` evaluation into the contents of a `Space` (which we'll
probably want someday as an editing tool anyway).
While
embedded-graphics
has been a useful source of drawing operations, there are disadvantages:PixelColor
implementers are going to be required to be convertible from bytes which means we'll need to indirect through a palette to draw any blocks that aren't plain color blocksaz
.Therefore, I believe we should replace e-g. Its current usage is:
raytrace_to_texture
Primitive::Text
.make_some_voxel_blocks()
(601910d)vui::widgets::LargeText
Icons::Delete
Migration plan:
raytrace_to_texture
directly (perhaps with the help ofimgref
), without e-g involved.Icons::Delete
with an image file.Primitive::Text
formake_some_voxel_blocks()
.Primitive::Text
or (for large text) a way to ask our own fonts to draw into aSpaceTransaction
or for their pixels (for info text overlay).draw_target()
methods.embedded-graphics
entirely.Open questions:
The text was updated successfully, but these errors were encountered: