Displaying mathematical P issues

General TRichView support forum. Please post your questions here
Post Reply
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Displaying mathematical P issues

Post 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:
testMathP.rtf
(1.31 KiB) Downloaded 1094 times
Ideas on what we could do different?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Displaying mathematical P issues

Post 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".
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Re: Displaying mathematical P issues

Post by jgkoehn »

Thanks for the ideas Sergey.
This is what we are seeing you should be able to see the font names in the images.
See at the very end for a comparison side by side with another application in Linux/Wine.
image_2021_01_27T00_27_39_803Z.png
image_2021_01_27T00_27_39_803Z.png (43.06 KiB) Viewed 16633 times
image_2021_01_27T00_11_58_484Z.png
image_2021_01_27T00_11_58_484Z.png (37.34 KiB) Viewed 16633 times
image_2021_01_27T00_10_54_797Z.png
image_2021_01_27T00_10_54_797Z.png (44.67 KiB) Viewed 16633 times
Here is something similar but comparing another program. Both TRichView and the other program are running in Linux/Wine.
both.png
both.png (110.38 KiB) Viewed 16633 times
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Displaying mathematical P issues

Post 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.
JG
Posts: 11
Joined: Tue Nov 30, 2010 11:48 am

Re: Displaying mathematical P issues

Post 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
BabelMap in Wine 1.jpg (59.84 KiB) Viewed 16604 times
Post Reply