DropDownList missing font or string encoding issue - winforms

I have some Korean text I need to display on my WinForm. The text displays fine in my ListBox control. The same text does not display in my DropDownList control. Both controls have a font of Arial 8pt. The ItemHeight property for both controls is 14. I can't spot any differences in the properties of these controls that would mean one control displays the text correctly and the other doesn't.
I have read in the following article that the problem is either caused by the font or the character encoding.
From what I can gather, the code uses standard .NET strings. There are no character conversions taking place. The required font to display Korean must be installed, otherwise I would not be able to view it in one control and not another. What am I doing wrong?

I resolved this by changing the font from Arial 8pt to Arial Unicode MS 8.25pt. As Luis Quijada pointed out when he suggested I look at this question
ComboBox with Segoe UI and Japanese text
Changing the font from Arial to Arial Unicode MS was an acceptable workaround for me. I'm not sure which languages Arial is supposed to support. It's possibly a Microsoft bug that Arial works in the ListBox but not in the DropDownList for the Korean text.

Related

DraftJS can not keep color when typing Japanese characters

We are implementing rich editor using DraftJS. As a reference we do some study on the sample published by DraftJS Github example.
The code is here
https://github.com/facebook/draft-js/blob/main/examples/draft-0-10-0/color/color.html
But we are confused about the phenomenon that the color can not be applied on Japanese when selection is sCollapsed.
when we typing English characters into the editor, font-color will be added to the typing characters.
But when we try to type Japanese into the editor, selected color will not be applied to the typed characters
Does anyone knows how to keep the color effecting on the inputing characters event it is a Japanese characters?

What's the Microsoft font that looks same/closer to 'Estrangelo Edessa'?

I am facing display issues with winforms in window 10 OS. The fonts used for forms is 'Estrangelo Edessa’. In windows 10, this font doesn't come installed by default and hence text/content looks ugly (cutoff/improperly sized). So i am thinking to change the font that looks closer to 'Estrangelo Edessa' and will be native to windows 7, 8 and 10. Please suggest one such font.
I suggest trying Verdana or Lucida Sans Unicode as they have similar proportions to Estrangelo Edessa. Alternatively, Calibri is narrower but otherwise similar and nicer to read.
You may also want to look into having your forms size the controls so text is never cut off, just in case. For example, all WinForms controls have a PreferredSize property.

Crystal Reports is cutting right text on report and paper

I got this problem that drive me crazy. I have a project in VS2013 with v.13.0.15.1840. I'm using a auto grow field (has his own section) in crystal reports that is displaying a text interpreted as RTF. The problem is that on preview and even paper, the right side of the text is cut off (see screenshot). If the text is justified the it shows OK but I have situations when I need the text align to left.
So far I tried but with no effect:
Setting margins manually on Format Object, Paragraph.
Selecting no printer,Disassociating formatting page size and printer paper size.
Making the field smaller horizontally.
Does anyone know a solution for this?
The field on designer:
Edited for further explanations:
The RTF code can be viewed at https://gist.github.com/andySF/7ca61ffbe6ab6da53ca1
Also another try was to put my field in a textbox and then setting the right margin of the textbox to 3cm. It appears that the margin is somehow overridden after the first paragraph.
Use
Modyfi your datasource text rtf before send in to report CR
model.Document= model.Document.Replace("\pard", "\pard\ri380")

Difference between Silverlight and WPF for TextBlock.BaselineOffset

I'm using a shared code to produce documents in Silverlight and WPF. But the output is different for the TextBlock alignment.
For example for a TextBlock of height 100, displaying a text in Arial with a FontSize of 100 :
In WPF the BaselineOffset is 92.16333
In Silverlight the BaselineOffset is 90.52667
This difference depends on the font family, for example if I replace Arial by Times New Roman :
In WPF the BaselineOffset is 91.23666
In Silverlight the BaselineOffset is 89,11
Is there a way to correct this behaviour and have the same alignment in WPF and Silverlight ?
Thanks for your help
Having worked in both WPF and Silverlight, I can confirm the rendering output of the same fonts at the same font size the output looks significantly different on screen.
In WPF you have a bit more control using RenderOptions i.e.:
RenderOptions.SetBitmapScalingMode(tb, BitmapScalingMode.NearestNeighbor);
RenderOptions.SetClearTypeHint(tb, ClearTypeHint.Auto);
RenderOptions.SetEdgeMode(tb, EdgeMode.Aliased);
You may need to play with values above to get as close as possible. Also as the renderoptions API is WPF only, if you're in a shared codebase you'd need to wrap it in a #if WPF directive..

WPF RichTextBox RTL

I am having troubles with RTL support in RichTextBox and WPF.
When I am trying to write using RTL the following sentence in RichTextBox - "9*11" the number flip sides between the astrik.
My keyboard is in hebrew mode
As you can see it is "11*9" and not "9*11", any ideas?
Have you changed anything in the properties of RichTextBox besides: FlowDirection="RightToLeft"?
Can you try with English Keyboard?

Resources