Use One-Time Initialization for glyph run caching to avoid duplicate glyph run genera...
[gdipp.git] / gdipp_server / glyph_run.h
blob27f5cb038364a99eba12786e806ef5d1e63b1349
1 #pragma once
3 namespace gdipp
6 class glyph_run
8 public:
9 // information for a glyph run, minimum units in the glyph run cache
11 // glyph data pointers
12 // different glyph runs could share same glyph, therefore each glyph is the minimum units in the glyph cache
13 std::vector<FT_Glyph> glyphs;
16 the bounding boxes are dependent to specific glyph run
17 control box is the formal positioning according to the glyph's advance std::vector
18 black box, on the other hand, is the actual positioning, with glyph's bearing and bitmap width concerned
19 the left border of the first glyph's control box always starts at 0, while the black box varies
21 std::vector<RECT> ctrl_boxes;
22 std::vector<RECT> black_boxes;