mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: fix typos (#21089)
This commit is contained in:
parent
9ad84ddc21
commit
f77bb32044
193 changed files with 403 additions and 402 deletions
|
@ -176,7 +176,7 @@ pub fn (ctx &Context) draw_text2(p DrawTextParams) {
|
|||
bold: p.bold
|
||||
mono: p.mono
|
||||
italic: p.italic
|
||||
}) // TODO perf once it's the only function to draw text
|
||||
}) // TODO: perf once it's the only function to draw text
|
||||
}
|
||||
|
||||
// draw_text draws the string in `text_` starting at top-left position `x`,`y`.
|
||||
|
@ -197,7 +197,7 @@ pub fn (ctx &Context) draw_text(x int, y int, text_ string, cfg gx.TextCfg) {
|
|||
eprintln('gg: draw_text(): font not initialized')
|
||||
return
|
||||
}
|
||||
// text := text_.trim_space() // TODO remove/optimize
|
||||
// text := text_.trim_space() // TODO: remove/optimize
|
||||
// mut text := text_
|
||||
// if text.contains('\t') {
|
||||
// text = text.replace('\t', ' ')
|
||||
|
@ -233,7 +233,7 @@ pub fn (ctx &Context) text_width(s string) int {
|
|||
ctx.ft.fons.text_bounds(0, 0, s, &buf[0])
|
||||
if s.ends_with(' ') {
|
||||
return int((buf[2] - buf[0]) / ctx.scale) +
|
||||
ctx.text_width('i') // TODO fix this in fontstash?
|
||||
ctx.text_width('i') // TODO: fix this in fontstash?
|
||||
}
|
||||
res := int((buf[2] - buf[0]) / ctx.scale)
|
||||
// println('TW "$s" = $res')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue