ui icon indicating copy to clipboard operation
ui copied to clipboard

UI can't display Chinese correctly

Open sail1972 opened this issue 4 years ago • 9 comments

V version: V 0.2.2 4c22370 UI version: commit 6e6f55ec27e72146b2048491e474121ff593e7e8 OS: macOS Big Sur

What did you do? UI can't display Chinese correctly

截屏2021-05-18 上午1 32 55

sail1972 avatar May 17 '21 17:05 sail1972

@yuyi98 any thoughts on this?

ylluminate avatar Jun 06 '21 17:06 ylluminate

@ylluminate Sorry, I haven't studied that, I'll try.

yuyi98 avatar Jun 07 '21 00:06 yuyi98

@ylluminate It can work. we must set chinese font path in ui.window(), just like:

	window := ui.window({
		width: win_width
		height: win_height
		state: app
		title: 'V UI Demo'
		font_path: os.resource_abs_path(os.join_path('assets/fonts/', 'simsun.ttf'))
		// bg_color: gx.light_blue
	}, [
...

Snipaste_2021-06-11_12-55-20

yuyi98 avatar Jun 11 '21 04:06 yuyi98

@sail1972 does this info help with both this and your other issue?

Thank you for looking into this @yuyi98!

ylluminate avatar Jun 11 '21 06:06 ylluminate

I think the cause is that gg module get some error. See https://github.com/vlang/v/pull/10309

sail1972 avatar Jun 16 '21 09:06 sail1972

You can set Window.font_path to display it correctly. So this issue can be closed.

範囲を選択_004

ghost avatar Sep 08 '21 07:09 ghost

@yuyi98 When I run v,but get an err, get a frozen window! v run users.v gg error: WGL: ARB_create_context_profile required!

Then ,get a tip window, title is 'Microsft Visual C++ Runtime library'. What can I do ,thank you!

FrankLIKE avatar Apr 22 '22 13:04 FrankLIKE

I just tested it, It's ok. Please get the latest version of v and ui.

yuyi98 avatar Apr 22 '22 13:04 yuyi98