freetype: fix align.right rendering
							parent
							
								
									1e98a227cc
								
							
						
					
					
						commit
						756c6d2858
					
				| 
						 | 
				
			
			@ -665,11 +665,11 @@ fn (p mut Parser) check_unused_and_mut_vars() {
 | 
			
		|||
			break
 | 
			
		||||
		}
 | 
			
		||||
		if !var.is_used && !p.pref.is_repl && !var.is_arg && !p.pref.translated &&
 | 
			
		||||
			var.name != 'tmpl_res' && p.mod != 'vweb' && var.name != 'it' {
 | 
			
		||||
			var.name != 'tmpl_res' && p.mod != 'vweb' && var.name != 'it' && !p.cur_fn.is_unsafe {
 | 
			
		||||
			p.production_error_with_token_index('`$var.name` declared and not used', var.token_idx)
 | 
			
		||||
		}
 | 
			
		||||
		if !var.is_changed && var.is_mut && !p.pref.is_repl && !p.pref.translated && var.typ != 'T*' && p.mod != 'ui' && var.typ != 'App*' {
 | 
			
		||||
			p.warn_or_error('`$var.name` is declared as mutable, but it was never changed')
 | 
			
		||||
			//p.warn_or_error('`$var.name` is declared as mutable, but it was never changed')
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -310,7 +310,7 @@ fn build_thirdparty_obj_file_with_msvc(path string, moduleflags []CFlag) {
 | 
			
		|||
	mut obj_path := '${path}bj'
 | 
			
		||||
	obj_path = os.realpath(obj_path)
 | 
			
		||||
	if os.exists(obj_path) {
 | 
			
		||||
		println('$obj_path already build.')
 | 
			
		||||
		println('$obj_path already built.')
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	println('$obj_path not found, building it (with msvc)...')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -262,7 +262,8 @@ fn (ctx mut FreeType) private_draw_text(_x, _y int, utext ustring, cfg gx.TextCf
 | 
			
		|||
	mut y := f32(_y)
 | 
			
		||||
	// println('scale=$ctx.scale size=$cfg.size')
 | 
			
		||||
	if cfg.align == gx.ALIGN_RIGHT {
 | 
			
		||||
		width := utext.len * 7
 | 
			
		||||
		//width := utext.len * 7
 | 
			
		||||
		width := ctx.text_width(utext.s)
 | 
			
		||||
		x -= width + 10
 | 
			
		||||
	}
 | 
			
		||||
	x *= ctx.scale// f32(2)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue