Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Chinese/Japanese text #3522

Closed
Wyvernius opened this issue Feb 5, 2020 · 9 comments
Closed

Problem with Chinese/Japanese text #3522

Wyvernius opened this issue Feb 5, 2020 · 9 comments

Comments

@Wyvernius
Copy link

Wyvernius commented Feb 5, 2020

internationalÏñŧĕŕŋāţלגזסכײת 日本語Вџссибجرطف中文Ηελενιγ
the string above is correctly rendered on all programs on the machine but not in avalonia.
Only the Japanese and Chinese characterd render as ractangles.
The chinise fonts are installed on my system.
MAybse someone has an idea on how to fix this?
Currently using Avalonia 9.2 with NET 4.7.2 on Windows.

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
        x:Class="FontFamilyTest.MainWindow"
        Title="FontFamilyTest"
        >
  internationalÏñŧĕŕŋāţלגזסכײת 日本語Вџссибجرطف中文Ηελενιγ
</Window>
@Gillibald
Copy link
Contributor

#3438

@chaojian-zhang
Copy link

chaojian-zhang commented Mar 13, 2020

Hi I am using Avalonia 0.9.4 with .Net Core 3.1, I am experiencing issue displaying Chinese characters:

  1. I have tried all fonts that's mentioned including ones specifically for Chinese (e.g. 楷体) and it always displays a boxes (see screenshot) - however it's perfectly safe to copy those boxes from the application to other places and it will display correctly (e.g. inside Notepad++) so the encoding is right but somehow either the font is not working or the framework isn't loading the font correctly.
  2. The letters display fine in title

2020-03-13 15 40 13

I have looked into #3438 and that doesn't work as well.

@grokys
Copy link
Member

grokys commented Mar 13, 2020

Hi @chaojian-zhang, when you said "I have looked into #3438 and that doesn't work as well" - how have you tested it? That PR isn't part of an official release yet so you'll have to use our unstable packages: http://avaloniaui.net/docs/quickstart/packages#unstable-releases

@chaojian-zhang
Copy link

chaojian-zhang commented Mar 17, 2020

I saw on the issue page it's merged and thought that's already published.

I used Version 0.9.4 which was published on Wednesday, March 11, 2020 (3/11/2020). I am not sure whether that's the nightly build you were referring to though.

2020-03-16 21 45 29

@Codexiaoyi
Copy link

#3438

TextBlock can be displayed, but the TextBox also cannot display Chinese normally.

@Codexiaoyi
Copy link

Hi @chaojian-zhang, when you said "I have looked into #3438 and that doesn't work as well" - how have you tested it? That PR isn't part of an official release yet so you'll have to use our unstable packages: http://avaloniaui.net/docs/quickstart/packages#unstable-releases

Hi ,I used unstable-release with version:0.9.999-cibuild0006235-beta,TextBlock can be displayed, but the TextBox also cannot display Chinese normally.Is there any plan to fix it?Hope you can reply me,please.

@Gillibald
Copy link
Contributor

TextBox will get a rewrite this year but can't say when.

@Codexiaoyi
Copy link

TextBox will get a rewrite this year but can't say when.

Nice!I look forward to using it as soon as possible.

@JasonGrass
Copy link

Setting TextBox FontFamily like this maybe useful for Chinese :
"Microsoft YaHei,Simsun,苹方-简,宋体-简"

我这里直接设置系统字体可以解决,将 FontFamily 设置为 "Microsoft YaHei,Simsun,苹方-简,宋体-简"
详见:AvaloniaUI TextBox 不能显示中文的问题解决 - J.晒太阳的猫

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants