Commit 520fc3a 1 parent 135d56e commit 520fc3a Copy full SHA for 520fc3a
File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -180,20 +180,21 @@ pub fn draw_char_with_font_onto(
180
180
drawn_ch : & mut DrawnCharacter ,
181
181
font : & Font ,
182
182
onto : & mut Box < dyn LikeLayerSlice > ,
183
- ) {
184
- drawn_ch . draw_box = render_char_onto (
183
+ ) -> ( Rect , GlyphMetrics ) {
184
+ let ( bounding_box , glyph_metrics ) = render_char_onto (
185
185
drawn_ch. value ,
186
186
font,
187
187
onto,
188
188
drawn_ch. pos ,
189
189
drawn_ch. color ,
190
190
drawn_ch. font_size ,
191
- )
192
- . 0 ;
191
+ ) ;
192
+ drawn_ch. draw_box = bounding_box;
193
+ ( bounding_box, glyph_metrics)
193
194
}
194
195
195
196
pub fn load_font ( path : & str ) -> Font {
196
- let font_bytes = {
197
+ let font_bytes: Vec < u8 > = {
197
198
#[ cfg( target_os = "axle" ) ]
198
199
{
199
200
let file_read_request = ReadFile :: new ( path) ;
You can’t perform that action at this time.
0 commit comments