ui icon indicating copy to clipboard operation
ui copied to clipboard

rendering persian text is wrong

Open metif12 opened this issue 4 years ago • 4 comments

in persian characters have "Contextual forms". also persian is right to left so first character goose right not left. https://en.wikipedia.org/wiki/Persian_alphabet i think rendering would be wrong in arabic too.

V version: OS: linux, Linux version 5.10.46-1-lts (linux-lts@archlinux) (gcc (GCC) 11.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP Wed, 23 Jun 2021 16:18:42 +0000 Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz CC version: cc (GCC) 11.1.0

getwd: /home/mahdi vmodules: /home/mahdi/.vmodules vroot: /home/mahdi/repos/v vexe: /home/mahdi/repos/v/v vexe mtime: 2021-07-16 07:36:48 is vroot writable: true is vmodules writable: true V full version: V 0.2.2 cbe4ac7

Git version: git version 2.32.0 Git vroot status: weekly.2021.26-151-gcbe4ac70 .git/config present: true thirdparty/tcc status: thirdparty-linux-amd64 7543de81

UI version: Name: ui Version: 0.0.4 Description: V UI is a cross-platform UI toolkit for Windows, macOS, Linux, and soon Android, iOS and the web (JS/WASM). Homepage: https://github.com/vlang/ui Author: medvednikov License: GPL3 + commercial Location: /home/mahdi/.vmodules/ui Requires:

OS: Linux lenovo 5.10.46-1-lts #1 SMP Wed, 23 Jun 2021 16:18:42 +0000 x86_64 GNU/Linux

What did you do?

import ui

fn main() {
	ui.message_box('سلام دنیا')
}

What did you expect to see? image

What did you see instead? image

metif12 avatar Jul 16 '21 08:07 metif12

Does manually setting a font path like in https://github.com/vlang/ui/issues/353#issuecomment-859260821 work?

serkonda7 avatar Jul 31 '21 15:07 serkonda7

Does manually setting a font path like in #353 (comment) work?

image setting a persian font not help. you can use this open source font for testing with: "سلام دنیا"

metif12 avatar Aug 01 '21 07:08 metif12

fn main() {
    println('سلام دنیا')
}

doesn't print correctly in terminal on my pc, so I guess this is not a problem of v-ui but v. please file an issue to https://github.com/vlang/v/issues

ghost avatar Aug 03 '21 05:08 ghost

fn main() {
    println('سلام دنیا')
}

doesn't print correctly in terminal on my pc, so I guess this is not a problem of v-ui but v. please file an issue to https://github.com/vlang/v/issues

hi. i already open this issue on v too. https://github.com/vlang/v/issues/10825

but in your case i think its because terminals not support persian correctly (rendering text in terminal is happen by terminal it self not by v), try

 echo 'سلام دنیا'

image image

metif12 avatar Aug 03 '21 06:08 metif12