MCPcopy Create free account
hub / github.com/MapServer/MapServer / load_font

Method load_font

renderers/agg/src/agg_gsv_text.cpp:544–563  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

542
543 //-------------------------------------------------------------------------
544 void gsv_text::load_font(const char* file)
545 {
546 m_loaded_font.resize(0);
547 FILE* fd = fopen(file, "rb");
548 if(fd)
549 {
550 unsigned len;
551
552 fseek(fd, 0l, SEEK_END);
553 len = ftell(fd);
554 fseek(fd, 0l, SEEK_SET);
555 if(len > 0)
556 {
557 m_loaded_font.resize(len);
558 fread(&m_loaded_font[0], 1, len, fd);
559 m_font = &m_loaded_font[0];
560 }
561 fclose(fd);
562 }
563 }
564
565 //-------------------------------------------------------------------------
566 void gsv_text::text(const char* text)

Callers 3

agg2RenderGlyphsFunction · 0.45
agg2RenderTruetypeSymbolFunction · 0.45
agg2GetTruetypeTextBBoxFunction · 0.45

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected