MCPcopy Create free account
hub / github.com/MyGUI/mygui / main

Function main

MyGUIEngine/src/msdfgen/main.cpp:530–1403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528 "\n";
529
530int main(int argc, const char *const *argv) {
531 #define ABORT(msg) do { fputs(msg "\n", stderr); return 1; } while (false)
532
533 // Parse command line arguments
534 enum {
535 NONE,
536 SVG,
537 FONT,
538 VAR_FONT,
539 DESCRIPTION_ARG,
540 DESCRIPTION_STDIN,
541 DESCRIPTION_FILE
542 } inputType = NONE;
543 enum {
544 SINGLE,
545 PERPENDICULAR,
546 MULTI,
547 MULTI_AND_TRUE,
548 METRICS
549 } mode = MULTI;
550 enum {
551 NO_PREPROCESS,
552 WINDING_PREPROCESS,
553 FULL_PREPROCESS
554 } geometryPreproc = (
555 #ifdef MSDFGEN_USE_SKIA
556 FULL_PREPROCESS
557 #else
558 NO_PREPROCESS
559 #endif
560 );
561 bool legacyMode = false;
562 MSDFGeneratorConfig generatorConfig;
563 generatorConfig.overlapSupport = geometryPreproc == NO_PREPROCESS;
564 bool scanlinePass = geometryPreproc == NO_PREPROCESS;
565 FillRule fillRule = FILL_NONZERO;
566 Format format = AUTO;
567 const char *input = NULL;
568 const char *output = "output." DEFAULT_IMAGE_EXTENSION;
569 const char *shapeExport = NULL;
570 const char *svgExport = NULL;
571 const char *testRender = NULL;
572 const char *testRenderMulti = NULL;
573 bool outputSpecified = false;
574#ifdef MSDFGEN_EXTENSIONS
575 bool glyphIndexSpecified = false;
576 GlyphIndex glyphIndex;
577 unicode_t unicode = 0;
578 FontCoordinateScaling fontCoordinateScaling = FONT_SCALING_LEGACY;
579 bool fontCoordinateScalingSpecified = false;
580#endif
581
582 int width = 64, height = 64;
583 int testWidth = 0, testHeight = 0;
584 int testWidthM = 0, testHeightM = 0;
585 bool autoFrame = false;
586 enum {
587 RANGE_UNIT,

Callers

nothing calls this directly

Calls 15

parseUnsignedDecOrHexFunction · 0.85
GlyphIndexClass · 0.85
parseUnicodeFunction · 0.85
parseUnsignedFunction · 0.85
RangeClass · 0.85
parseAngleFunction · 0.85
parseUnsignedLLFunction · 0.85
loadSvgShapeFunction · 0.85
initializeFreetypeFunction · 0.85
loadVarFontFunction · 0.85
loadFontFunction · 0.85
getGlyphIndexFunction · 0.85

Tested by

no test coverage detected