mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
fmt: fix alignment of struct init fields (#22025)
This commit is contained in:
parent
99da5726db
commit
c51d30bf53
671 changed files with 18817 additions and 18787 deletions
|
@ -46,12 +46,12 @@ fn new_ft(c FTConfig) ?&FT {
|
|||
}
|
||||
|
||||
return &FT{
|
||||
fons: fons
|
||||
fons: fons
|
||||
font_normal: fons.add_font_mem('sans', bytes_normal, false)
|
||||
font_bold: fons.add_font_mem('sans', bytes_bold, false)
|
||||
font_mono: fons.add_font_mem('sans', bytes_mono, false)
|
||||
font_bold: fons.add_font_mem('sans', bytes_bold, false)
|
||||
font_mono: fons.add_font_mem('sans', bytes_mono, false)
|
||||
font_italic: fons.add_font_mem('sans', bytes_italic, false)
|
||||
scale: c.scale
|
||||
scale: c.scale
|
||||
}
|
||||
} else {
|
||||
// Load default font
|
||||
|
@ -111,12 +111,12 @@ fn new_ft(c FTConfig) ?&FT {
|
|||
debug_font_println('Font used for font_mono : ${mono_path}')
|
||||
debug_font_println('Font used for font_italic : ${italic_path}')
|
||||
return &FT{
|
||||
fons: fons
|
||||
fons: fons
|
||||
font_normal: fons.add_font_mem('sans', bytes, false)
|
||||
font_bold: fons.add_font_mem('sans', bytes_bold, false)
|
||||
font_mono: fons.add_font_mem('sans', bytes_mono, false)
|
||||
font_bold: fons.add_font_mem('sans', bytes_bold, false)
|
||||
font_mono: fons.add_font_mem('sans', bytes_mono, false)
|
||||
font_italic: fons.add_font_mem('sans', bytes_italic, false)
|
||||
scale: c.scale
|
||||
scale: c.scale
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -184,15 +184,15 @@ pub:
|
|||
|
||||
pub fn (ctx &Context) draw_text2(p DrawTextParams) {
|
||||
ctx.draw_text(p.x, p.y, p.text, gx.TextCfg{
|
||||
color: p.color
|
||||
size: p.size
|
||||
align: p.align
|
||||
color: p.color
|
||||
size: p.size
|
||||
align: p.align
|
||||
vertical_align: p.vertical_align
|
||||
max_width: p.max_width
|
||||
family: p.family
|
||||
bold: p.bold
|
||||
mono: p.mono
|
||||
italic: p.italic
|
||||
max_width: p.max_width
|
||||
family: p.family
|
||||
bold: p.bold
|
||||
mono: p.mono
|
||||
italic: p.italic
|
||||
}) // TODO: perf once it's the only function to draw text
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue