Problem with STIX Math font
Problem with STIX Math font
Hi, I have a problem with the "STIXTwoMath-Regular" math font. It is a very common and functional font. But when I try to use it (just select from ComboBox in the Equation Editor), I get AV.
I can't attach the font to this post, it's 819 kB. But you can download it freely here:
https://github.com/stipub/stixfonts/tre ... static_otf
I can't attach the font to this post, it's 819 kB. But you can download it freely here:
https://github.com/stipub/stixfonts/tre ... static_otf
-
- Site Admin
- Posts: 17554
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Problem with STIX Math font
I cannot reproduce this problem.
Do you use the newest version of TRichView?
Can you send a call stack at the moment of exception?
(Compile your application with stack frames and without optimization (Project | Options, Building | Delphi Compiler | Compiling page).
When an AV happens, open call stack window ( View | Debug Windows | Call stack), select all (Ctrl+A), copy (Ctrl+C))
Do you use the newest version of TRichView?
Can you send a call stack at the moment of exception?
(Compile your application with stack frames and without optimization (Project | Options, Building | Delphi Compiler | Compiling page).
When an AV happens, open call stack window ( View | Debug Windows | Call stack), select all (Ctrl+A), copy (Ctrl+C))
Re: Problem with STIX Math font
Yes, I am attaching the ZIP. The archive contains a test application and screenshots.
I use the latest version of RV.
And here I recorded the sequence of my actions on video:
https://dystlab.store/download/gftruiw/ ... 120859.wmv
I use the latest version of RV.
And here I recorded the sequence of my actions on video:
https://dystlab.store/download/gftruiw/ ... 120859.wmv
- Attachments
-
- test.zip
- Delphi Project + Screenshots
- (157.82 KiB) Downloaded 1014 times
-
- Site Admin
- Posts: 17554
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Problem with STIX Math font
Sorry, I still cannot reproduce error, even in your project.
Since AV happens in Adit Math Engine code, I forwarded this question to its developer.
As I can see, this error happens on memory allocation. Do you have some custom memory manager installed in Delphi?
Since AV happens in Adit Math Engine code, I forwarded this question to its developer.
As I can see, this error happens on memory allocation. Do you have some custom memory manager installed in Delphi?
Re: Problem with STIX Math font
I don't use custom memory managers, but If we need a more detailed analysis, I am ready.Sergey Tkachenko wrote: ↑Sat Jan 28, 2023 8:02 pm Do you have some custom memory manager installed in Delphi?
Re: Problem with STIX Math font
I experimented a bit and this is what I found. The STIX font set includes several math fonts:
- STIXTwoMath-Regular.otf (from the "fonts > static_otf" subfolder, 819 KB)
- STIXTwoMath-Regular.ttf (from the "fonts > static_ttf" subfolder, 1483 KB)
Both of these fonts result in an error (AV). But this font worked fine:
- STIXTwoMath-Regular.input.ttf (from the "source" subfolder, 1099 KB).
Maybe you used this last version of font (STIXTwoMath-Regular.input.ttf) and that's why you didn't get AV?
- STIXTwoMath-Regular.otf (from the "fonts > static_otf" subfolder, 819 KB)
- STIXTwoMath-Regular.ttf (from the "fonts > static_ttf" subfolder, 1483 KB)
Both of these fonts result in an error (AV). But this font worked fine:
- STIXTwoMath-Regular.input.ttf (from the "source" subfolder, 1099 KB).
Maybe you used this last version of font (STIXTwoMath-Regular.input.ttf) and that's why you didn't get AV?
-
- Site Admin
- Posts: 17554
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Problem with STIX Math font
AME developer suggested to comment the following code in RVMathTable:
(He said that free version of AME has a bug in processing MathKernInfo, and it is not used in it anyway)
Code: Select all
if GlyphInfo.MathKernInfo > 0 then
begin
KernInfo := PMathKernInfoRec(NativeUInt(GlyphInfo) + GlyphInfo.MathKernInfo);
KernInfo.SwapTable;
KernInfo.CopyTo(FGlyphInfo.KernInfo);
end;
Re: Problem with STIX Math font
I commented the code and tested AME's solution. The fonts "STIXTwoMath-Regular.otf" and "STIXTwoMath-Regular.ttf" failed anyway (now the AV appears in a different place). It seems to me that the engine does not work properly with some characters, because the font "STIXTwoMath-Regular.input.ttf" works correctly. I will use it for now.
And what does "free version of AME has a bug" mean? Doesn't the paid version have this bug?
And what does "free version of AME has a bug" mean? Doesn't the paid version have this bug?
-
- Site Admin
- Posts: 17554
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Problem with STIX Math font
Sorry, I do not know, I even cannot reproduce this bug: for me, the free version (included in TRichView) works with all math fonts that I have installed.
You can contact AME developer, Denis Sletcov,
math (at) aditmath.com
You can contact AME developer, Denis Sletcov,
math (at) aditmath.com