0

Is there already a built-in mechanism or method for creating a mathbuild using only the IDWRITE interfaces that would produce a similar type of math buildup compared to using an RTF window with the OLE/ITextRange2/ITextFont2 interfaces?

  • If you mean math expressions formatting, then no, there is nothing builtin for that in directwrite. – bunglehead Oct 06 '22 at 03:53
  • OK. So, I will have to figure out how to implement the Windowless TextService/TextHost to render the MathBuildUp to a device context instead of trying to scroll the MathBuildUp into view to do a screen capture from the RTF Edit window. I think this would be the easiest option rather than reinventing a MathBuildUp using D2D and DWRITE. If anyone has a more detailed example than what is found on MSDN of how to implement the Windowless TextService/TextHost interfaces, please share the knowledge. – Sempai-Dami1 Oct 06 '22 at 13:11

1 Answers1

1

The Office riched20.dll supports window'd D2D/DWrite controls. See https://devblogs.microsoft.com/math-in-office/richeditd2d-window-controls/. The Windows 11 Notepad uses a window RichEdit control to get color emoji and other improvements available with the D2D/DWrite controls. With the msftedit.dll, you need to create a RichEdit windowless control to use D2D/DWrite. Reinventing MathBuildUp isn't easy unfortunately due to the effort to make UnicodeMath resemble a math notation. This introduces more complicated algorithms that look forward as well backward.