Implemented 2D Fonts

Selecting 2D fonts

In any class implementing mrpt::utils::CCanvas, the text font can be selected using CCanvas::selectTextFont. Next, text can be drawn with CCanvas::textOut. Note that one of the most commonly used implementations of CCanvas is CImage.

List of fonts

  • “6×13”
  • “6x13B” (bold)
  • “6x13O” (italic)
  • “9×15”
  • “9x15B” (bold)
  • “10×20”
  • “18x18ja” (Japanese, UNICODE character values)

The following image is taken from the example MRPT/samples/textFonts, refer to the source code for further details.



[spoiler title=”See C++ code” style=”2″] [/spoiler]