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?
Displaying mathematical P issues
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Displaying mathematical P issues
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".
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
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.
Here is something similar but comparing another program. Both TRichView and the other program are running in Linux/Wine.
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.
Here is something similar but comparing another program. Both TRichView and the other program are running in Linux/Wine.
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Displaying mathematical P issues
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.
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
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
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