Feature #12194
symbol fonts (Script=symbol) in the font table
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
History
#1 Updated by Greg Shah 7 days ago
Problem¶
OpenEdge GUI applications define symbol fonts such as Wingdings in the font table, with the Script=symbol option:
[Fonts] font12=Wingdings, size=10, script=symbol
and then show icons as ordinary characters in that font, typically check and cross marks in browse columns and fill-ins:
ASSIGN cStatus = IF lDone THEN CHR(252) ELSE CHR(251). /* Wingdings check / cross */ DISPLAY cStatus WITH FRAME f. /* column uses FONT 12 */
On Windows the font has its own glyphs at those code points. FWD's FontTable strips the option (// TODO support "Script=symbol"), so the characters are shown in a text font: CHR(252) appears as "ü" and CHR(251) as "û" in the web and Swing clients.
Work¶
- Parse and keep
Script=symbolin the font table, and expose it on the font so the clients know it is a symbol font. - Choose how symbol characters are rendered, and implement it in both the web and Swing clients:
- map the symbol font's code points to the equivalent Unicode characters (for Wingdings, for example 251 to ✗ U+2717 and 252 to ✓ U+2713), drawn with a font that has them; or
- ship and use a symbol font with the same layout, where its licence allows.
- Provide mapping tables for Wingdings and Symbol at least, covering the whole 32-255 range, and let a project add or override mappings in its configuration.
- Apply the font wherever text is drawn: fill-ins, browse cells, labels, buttons, combo-boxes, editors and printed output (PDF).
- Measuring: text width and height in a symbol font must use the glyphs actually drawn, so column widths and
FONT-TABLE:GET-TEXT-WIDTHresults stay consistent. - Keep the character values unchanged in the 4GL:
ASCof the displayed value and the screen value must still return 251 or 252.
Testcases¶
- A browse with a calculated column in a Wingdings font showing
CHR(251)andCHR(252), compared with a Windows OpenEdge screenshot. - Fill-in, label and button text in Wingdings and Symbol for the whole 32-255 range, compared with Windows OpenEdge.
SCREEN-VALUEandASCof the displayed value.- The same screens printed to PDF.