Project

General

Profile

Feature #12194

symbol fonts (Script=symbol) in the font table

Added by Greg Shah 7 days ago. Updated 7 days ago.

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

  1. Parse and keep Script=symbol in the font table, and expose it on the font so the clients know it is a symbol font.
  2. 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.
  3. 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.
  4. Apply the font wherever text is drawn: fill-ins, browse cells, labels, buttons, combo-boxes, editors and printed output (PDF).
  5. Measuring: text width and height in a symbol font must use the glyphs actually drawn, so column widths and FONT-TABLE:GET-TEXT-WIDTH results stay consistent.
  6. Keep the character values unchanged in the 4GL: ASC of 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) and CHR(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-VALUE and ASC of the displayed value.
  • The same screens printed to PDF.

Also available in: Atom PDF