Home | Products | Issue Tracker | FAQ | Download | |
Date: | 2013/09 |
---|---|
Author: | Thomas Bonfort |
Contact: | thomas.bonfort@gmail.com |
Status: | Adopted |
Version: | MapServer 7.0 |
MapServer supports embedded BITMAP fonts for the simple rendering of text without need for external font files or fontsets. These are activated by using the TINY, SMALL, MEDIUM, LARGE and HUGE keywords in the LABEL block, but have a number of limitations:
They do however have the following advantages:
With the arrival of MS RFC 98: Label/Text Rendering Overhaul and MS RFC 99: Remove support for GD renderer, maintaining the support for bitmap fonts requires quite a number of warts in the code. Given this and the other limitations enumerated beforehand, this RFC proposes the removal of the BITMAP font support throughout the MapServer codebase.
To maintain the ability to rapidly prototype mapfiles and/or to not have to rely on external truetype fonts and fontsets, they will however be replaced by an embedded truetype font.
A Truetype font will be encoded and included as a binary blob inside the mapserver library. It will be used whenever no specific font has been supplied by the mapfile user, or as a backwards compatibility fallback when bitmap fonts are requested.
Rendered images when using embedded fonts will differ compared to the previous renderings with bitmap fonts. Aside from this point, no backwards incompatibility is to be expected: The bitmap keyword and label type will be ignored, and the TINY, SMALL, MEDIUM, LARGE and HUGE keyboard will be mapped to integer font sizes of matching visual height.
Might be noticeable:
These are not planned immediately, but could be investigated in the future depending on interest or funding:
Bitmap related functions could be extended to provide a warning the feature has been removed. No other changes should be required due to the transparent backwards compatibility handling.
TBD
The truetype file we embed shall have a licence that allows such usage, and a glyph coverage supporting most used languages while not being too large to limit memory consumption. Unless decided otherwise during the comment period, the chosen font will be the DejaVuSansCondensed.ttf truetype font commonly supplied with Linux distros.
+1 from SteveL, ThomasB, PericlesN, TamasS, TomK, StephanM, YewondwosssenA, MikeS, DanielM and StephenW