MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / getTextDimensions

Method getTextDimensions

lib/EpdFont/EpdFont.cpp:74–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void EpdFont::getTextDimensions(const char* string, int* w, int* h) const {
75 int minX = 0, minY = 0, maxX = 0, maxY = 0;
76
77 getTextBounds(string, 0, 0, &minX, &minY, &maxX, &maxY);
78
79 *w = maxX - minX;
80 *h = maxY - minY;
81}
82
83static uint8_t lookupKernClass(const EpdKernClassEntry* entries, const uint16_t count, const uint32_t cp) {
84 if (!entries || count == 0 || cp > 0xFFFF) {

Callers 3

getTextWidthMethod · 0.45
textWidthFunction · 0.45
textHeightFunction · 0.45

Calls

no outgoing calls

Tested by 2

textWidthFunction · 0.36
textHeightFunction · 0.36