Page 1 of 1
Displaying mathematical P issues
Posted: Tue Jan 26, 2021 5:48 pm
by jgkoehn
Greetings,
Mathematical P
https://www.fileformat.info/info/unicod ... /index.htm
Firstly the mathematical P works fine in Windows.
Secondly this same character does not work in Linux/wine in TRichView (it does work in some other programs so not sure that it is a Linux/Wine issue or a TRichview adjustment that we need to make.)
What happens is it displays in Linux/Wine as double boxes (If one turns off uniscribe text engine then it displays as one box). So not the mathematical P
It appears to be a substitution issue and there a limited amount of fonts that actually have it (such as Cambria, Cambria Math, Cardo, DejaVu Math TeX Gyre, Segoe UI Symbol) so other fonts substitute it.
Here is a file for testing this:
Ideas on what we could do different?
Re: Displaying mathematical P issues
Posted: Tue Jan 26, 2021 8:04 pm
by Sergey Tkachenko
Different fonts may be available in different systems.
If the character cannot be found in the font, it is substituted from another font.
If it cannot be found in any font, it will be displayed as a "no character" (usually as a box).
You can check the character availability using RichViewActions.
In the ActionTest project, open the Insert | Symbol dialog.
Select any non-symbol font.
In the "Character code" field, enter "1D513" (without quotes). Press "Go to character".
Now you can press "Next font>" button to list all fonts that have this characters.
On my Window computer, this character is in several "Math" fonts, "Symbola", "Cambria", "Segoe UI Symbol".
Re: Displaying mathematical P issues
Posted: Wed Jan 27, 2021 12:41 am
by jgkoehn
Re: Displaying mathematical P issues
Posted: Wed Jan 27, 2021 12:37 pm
by Sergey Tkachenko
I am afraid that I currently I have no idea why it happens
While TRichView itself uses Uniscribe to draw text, in the symbol dialog, the cell drawing procedure simply sets the canvas.Font and call Windows.TextOutW. I do not know what I can change.
I could imagine that somehow surrogate pairs (character with codes higher than $FFFF are represented by two WideChars) are reversed when loading a file. But it could not happen in the insert symbol dialog...
Unfortunately, finding the reason for this problem could take a lot of time, but currently I have a tough schedule, so I cannot tell when I will be able to look at it, sorry.
Re: Displaying mathematical P issues
Posted: Wed Jan 27, 2021 3:31 pm
by JG
Sergey
thank you for looking into this to see if the issue exists in TrichView.
It will be good if at some time you are able to establish what is actually happening. I realize that using Trich product in Wine, Linux might not be where you intend it to be used. We also face the issue with the product addons that we sell that uses the Trich as part of the rendering. When we got a report that the product was not working correctly it has taken us some time to check through things and come to the conclusion that we see an issue either with Wine or TrichView that we need to pursue fairly quickly to appease our customers.
Note that currently we have to disable Uniscribe when ones run our product in the Wine environment. It is interesting to see that when in Uniscribe there is one box and when in Windows mode there are two boxes.
Also just to show that BabelMap works ok in Wine, here is a shot showing the problem character/s
- BabelMap in Wine 1.jpg (59.84 KiB) Viewed 16773 times