cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with using text with different fonts in the same textarea (same problem with alignment)

MHase
Associate II

I want to change my text in a text-area between different ​languages.

My chinese text have an other font as my english text for example.

Unfortunately this works not. I can only change text within the chinese font or change within the english font. When i select a chinese text in the text area which was a english text before, then it will be displayed strange symbols (but not chinese :( ).

The same problem I have with alignment. When I have a text with alignment left and I want to change the text with now alignment right, then my new text has unfortunately left-alignment.

5 REPLIES 5
Martin KJELDSEN
Chief III

Hi @MHase​,

Can you show me a screenshot of these scenarios? Are you sure all your fonts contain the unicodes in the texts?

Best regards,

Martin

This is my screen when I have switched to German Language
[cid:image001.png@01D50C94.CC3CAFC0]
This is my screen when I have switched to Chinese Language
[cid:image002.png@01D50C94.CC3CAFC0]
Screenshot from texts Resources
[cid:image007.png@01D50C95.8101B1D0]
Screenshot from Texts Typographies (here is interessant that the Chinese Screen use the Fallback Character from MayberryPS22 instead of HeiSASC22)
[cid:image008.png@01D50C95.8101B1D0]
here you can see a part of the code from …ScreenPresenter.cpp
[cid:image003.png@01D50C96.13C3BB80]
here you can see a part of the code from …ScreeView.cpp
[cid:image004.png@01D50C96.13C3BB80]
here you can see a part of the code …/containers/CntrFullWidthButton.cpp
[cid:image009.png@01D50C96.CA5F5250]
I hope now it is clear what I mean with question:
Problem with using text with different fonts in the same textarea (same problem with alignment)
I want to change my text in a text-area between different ​languages.
My chinese text have an other font as my english text for example.
Unfortunately this works not. I can only change text within the chinese font or change within the english font. When i select a chinese text in the text area which was a english text before, then it will be displayed strange symbols (but not chinese :( ).
The same problem I have with alignment. When I have a text with alignment left and I want to change the text with now alignment right, then my new text has unfortunately left-alignment
If not understandable, please ask me again.
Thanks for answering.
best regards
Margret Hasenmaile

Hi Margret,

The attachments don't work. Even if the editor displays an image if you just copy paste it, it won't actually get uploaded. So you have to do that manually.

/Martin

Martin KJELDSEN
Chief III

Did you remember to switch language?

Texts::setLanguage(LanguageId id);

Thank you for answering immediately.
At the moment I have to work at other problems of my project and the project is not running at the moment, so I have shifted the language-problem to the back.
But I’m sure that I have switched the language:
Texts::setLanguage(CHI);
I try to explain my problem more precisely:
I need to write my texts sometimes with left-alignment, and sometimes the same text with right-alignment.
To avoid, to define all texts twice (left-alignmet AND right-alignment) I use only one wildcard with left-alignment and one wildcard with right-alignment.
Then I use the function const Unicode::UnicodeChar* getText() const
and then setWildcard(TextBuffer), selecting that wildcard with the necessary alignment. And this is perhaps my problem. The wildcard takes the text from the Chinese column but unfortunately not the Chinese font. Then the Chinese text will be displayed with the English font…this symbols are strange symbols in the English font [][][][][]…and that’s not the result I want to have ☹
best regards
Margret Hasenmaile