Math Font Binding

The post RichEdit Font Binding outlines how RichEdit chooses fonts when you paste or otherwise enter plain text into a RichEdit control. But it doesn’t describe how math font binding differs from natural-language font binding. The differences are due to 1)      Math styles like math italic, bold, script, Fraktur and double-struck are obtained by character…

0

Inserting and Getting Math Text in RichEdit

Starting with the Office 2007 RichEdit, it has been possible to enter math using the keyboard and to read and write RTF files that contain math zones. The RichEdit Text Object Model (TOM) ITextRange2 interface has methods to handle math programmatically, such as ITextRange2::BuildUpMath() and ITextRange2::SetInlineObject() and GetInlineObject(). But the methods don’t offer convenient ways…

0

RichEdit Language Tag Handling

For years, many applications have used the locale ID (LCID) to identify the language and locale for text and other data. For example since 1997 (RichEdit 2.0), RichEdit’s character formatting has included CHARFORMAT2::lcid. The LCID can, in fact, describe the vast majority of language/locale combinations in use as far as text is concerned. However the…

0

Color Fonts

The popularity of emoji symbols has encouraged a variety of technological innovations, notably fonts with multicolor characters. This is different from just having a text color, which is described in RichEdit Colors. While some colored glyphs were part of the original Japanese emoji standards, colored glyphs got much more elegant when Apple introduced its proprietary…

0

Single Line RichEdit Performance Runs

In applications that have lots of independent text instances such as spreadsheets and complex dialogs, one wants to know the tradeoffs between rapid display, memory usage, and editing functionality. As noted in the post Flyweight RichEdit Controls, using RichEdit to display such text avoids display glitches in switching from static display to edit mode and…

1

RichEdit Input APIs

With on-screen keyboards used commonly on phones, tablets and even on laptops, one might wonder how such keyboards can input characters and commands into a RichEdit control. With traditional hardware keyboards, messages like WM_CHAR, WM_KEYDOWN, and WM_SYSKEYDOWN offer a wide variety of input data. But the new touch-screen keyboards typically don’t use messages. This post…

0

Autolink Color Contrast

Typical documents use black for the text color and white for the background. This gives the highest contrast. Hyperlinks are often displayed in blue, which gives good contrast on a white background. But other combinations of colors may not be so easily distinguishable. This post describes how RichEdit handles such combinations and muses about possible…

0

Equation Numbering in Office 2016

Word 2016 and PowerPoint 2016 join OneNote 2010 (and later) in offering a way to display equation numbers flushed to the right margin. To enter an equation number using the linear format (see Section 3.21), type the equation followed by a # (U+0023) followed by the desired equation number text and hit Enter. For example,…

11

Hot Keys and altGr

The earlier post, RichEdit Hot Keys, lists all built-in RichEdit hot keys. In particular, it lists a popular hot key for typing the Euro (€), ctrl+alt+e, which works for some languages, such as US English. A problem may arise when altGr+e is assigned to some other character, such as é in Spanish keyboards. This is…

6

RichEdit Colors

Occasionally people ask how foreground (text) and background colors work in RichEdit. This post gives an overview of RichEdit colors in a variety of scenarios including default coloring, formatted coloring, selection coloring (both normal and acetate), math-zone highlighting and special draft and high-contrast modes. It also describes refinements such as switching to XOR coloring when…

2