Milky2018/mgstudio/text does not have a README file
pub struct ComputedTextBlock {
buffer : CosmicBuffer
needs_rerender : Bool
entities : Array[TextEntity]
}pub struct CosmicBuffer {
text : String
spans : Array[TextSpanRange]
font_size : Float
line_height : Float
justify : Justify
linebreak : LineBreak
max_width : Float?
max_height : Float?
}pub struct FontAtlas {
dynamic_texture_atlas_builder : DynamicTextureAtlasBuilder
glyph_locations : Array[(GlyphCacheKey, GlyphAtlasLocation)]
texture_atlas : Handle[TextureAtlasLayout]
texture : Handle[Image]
}fn FontAtlasKey::new(font : Handle[Font], font_size : Float, font_smoothing : FontSmoothing) -> FontAtlasKeyfn FontAtlasSet::has_glyph(self : FontAtlasSet, cache_key : GlyphCacheKey, font_key : FontAtlasKey) -> Boolpub struct GlyphAtlasInfo {
texture : Handle[Image]
texture_atlas : Handle[TextureAtlasLayout]
location : GlyphAtlasLocation
}pub struct GlyphCacheKey {
glyph_id : Int
subpixel_x : Int
subpixel_y : Int
font_weight : Int
flags : UInt
}fn GlyphCacheKey::new(glyph_id : Int, subpixel_x : Int, subpixel_y : Int, font_weight : Int, flags : UInt) -> GlyphCacheKeypub(all) enum LineHeight {
Px(Float)
RelativeToFont(Float)
}pub struct PositionedGlyph {
position : Vec2
size : Vec2
atlas_info : GlyphAtlasInfo
span_index : Int
line_index : Int
byte_index : Int
byte_length : Int
}pub struct RunGeometry {
span_index : Int
bounds : Rect
strikethrough_y : Float
strikethrough_thickness : Float
underline_y : Float
underline_thickness : Float
}pub struct Text2d {
content : String
}pub struct Text2dBundle {
text : Text2d
font : TextFont
color : TextColor
layout : TextLayout
bounds : TextBounds
line_height : LineHeight
shadow : Text2dShadow?
transform : Transform
layers : RenderLayers
anchor : Anchor
y_axis : YAxisOrientation
}fn Text2dBundle::new_with_layers(text : Text2d, font : TextFont, transform : Transform, layers : RenderLayers) -> Text2dBundlepub struct TextBounds {
width : Float?
height : Float?
}pub struct TextHandle {
id : Int
}pub struct TextLayoutInfo {
scale_factor : Float
glyphs : Array[PositionedGlyph]
run_geometry : Array[RunGeometry]
size : Vec2
}pub struct TextPipeline {
}pub struct TextSpan {
content : String
}pub struct TextSpanBundle {
span : TextSpan
font : TextFont
color : TextColor
line_height : LineHeight
}pub struct TextSpanHandle {
id : Int
}pub(all) enum YAxisOrientation {
TopToBottom
BottomToTop
}impl Eq for YAxisOrientationimpl Show for YAxisOrientationfn add_glyph_to_atlas(font_atlases : Array[FontAtlas], cache_key : GlyphCacheKey, raster : GlyphRaster, font_smoothing : FontSmoothing) -> GlyphAtlasInfo?fn font_rasterize_cache_key(font_system : FontSystem, cache_key : CacheKey, smoothing : FontSmoothing) -> GlyphRaster?fn font_rasterize_glyph(font : Handle[Font], font_size : Float, codepoint : Int, smoothing : FontSmoothing) -> GlyphRaster?fn font_rasterize_glyph_id(font : Handle[Font], font_size : Float, glyph_id : Int, smoothing : FontSmoothing) -> GlyphRaster?fn font_rasterize_glyph_id_subpixel(font : Handle[Font], font_size : Float, glyph_id : Int, smoothing : FontSmoothing, subpixel_x : Int, subpixel_y : Int) -> GlyphRaster?