采用 freetype/harfbuzz 绘制 UTF-8 字符串


class   cv::freetype::FreeType2
 

函数

Ptr < FreeType2 cv::freetype::createFreeType2 ()
  Create FreeType2 Instance. 更多...
 

详细描述

This modules is to draw UTF-8 strings with freetype/harfbuzz.

  1. Install freetype2 and harfbuzz in your system.
  2. Create FreeType2 instance with createFreeType2() function.
  3. Load font file with loadFontData() function.
  4. Draw text with putText() function.
  • If thickness parameter is negative, drawing glyph is filled.
  • If thickness parameter is positive, drawing glyph is outlined with thickness.
  • If line_type parameter is 16(or CV_AA), drawing glyph is smooth.

函数文档编制

◆  createFreeType2()

Ptr < FreeType2 > cv::freetype::createFreeType2 ( )

#include < opencv2/freetype.hpp >

Create FreeType2 Instance.

The function createFreeType2 create instance to draw UTF-8 strings.