MCPcopy Create free account
hub / github.com/creatale/node-dv / getFontData

Function getFontData

deps/opencv/modules/core/src/drawing.cpp:2127–2162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2125
2126
2127static const int* getFontData(int fontFace)
2128{
2129 bool isItalic = (fontFace & FONT_ITALIC) != 0;
2130 const int* ascii = 0;
2131
2132 switch( fontFace & 15 )
2133 {
2134 case FONT_HERSHEY_SIMPLEX:
2135 ascii = HersheySimplex;
2136 break;
2137 case FONT_HERSHEY_PLAIN:
2138 ascii = !isItalic ? HersheyPlain : HersheyPlainItalic;
2139 break;
2140 case FONT_HERSHEY_DUPLEX:
2141 ascii = HersheyDuplex;
2142 break;
2143 case FONT_HERSHEY_COMPLEX:
2144 ascii = !isItalic ? HersheyComplex : HersheyComplexItalic;
2145 break;
2146 case FONT_HERSHEY_TRIPLEX:
2147 ascii = !isItalic ? HersheyTriplex : HersheyTriplexItalic;
2148 break;
2149 case FONT_HERSHEY_COMPLEX_SMALL:
2150 ascii = !isItalic ? HersheyComplexSmall : HersheyComplexSmallItalic;
2151 break;
2152 case FONT_HERSHEY_SCRIPT_SIMPLEX:
2153 ascii = HersheyScriptSimplex;
2154 break;
2155 case FONT_HERSHEY_SCRIPT_COMPLEX:
2156 ascii = HersheyScriptComplex;
2157 break;
2158 default:
2159 CV_Error( CV_StsOutOfRange, "Unknown font type" );
2160 }
2161 return ascii;
2162}
2163
2164inline void readCheck(int &c, int &i, const string &text, int fontFace)
2165{

Callers 3

putTextFunction · 0.85
getTextSizeFunction · 0.85
cvInitFontFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected