How to use the @here/harp-text-canvas.FontStyle.Italic function in @here/harp-text-canvas

To help you get started, we’ve selected a few @here/harp-text-canvas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heremaps / harp.gl / @here / harp-examples / src / textcanvas_renderTarget.ts View on Github external
textRenderStyle.backgroundColor!.r = guiOptions.backgroundColor.r / 255.0;
            textRenderStyle.backgroundColor!.g = guiOptions.backgroundColor.g / 255.0;
            textRenderStyle.backgroundColor!.b = guiOptions.backgroundColor.b / 255.0;
        });
        gui.add(textRenderStyle, "backgroundOpacity", 0.0, 1.0, 0.1);
        gui.add(guiOptions, "fontName").onFinishChange((value: string) => {
            textRenderStyle.fontName = value;
            assetsLoaded = false;
            textCanvas.fontCatalog.loadCharset(textSample, textRenderStyle).then(() => {
                assetsLoaded = true;
            });
        });
        gui.add(textRenderStyle, "fontStyle", {
            Regular: FontStyle.Regular,
            Bold: FontStyle.Bold,
            Italic: FontStyle.Italic,
            BoldItalic: FontStyle.BoldItalic
        }).onChange((value: string) => {
            textRenderStyle.fontStyle = Number(value);
            assetsLoaded = false;
            textCanvas.fontCatalog.loadCharset(textSample, textRenderStyle).then(() => {
                assetsLoaded = true;
            });
        });
        gui.add(textRenderStyle, "fontVariant", {
            Regular: FontVariant.Regular,
            AllCaps: FontVariant.AllCaps,
            SmallCaps: FontVariant.SmallCaps
        }).onChange((value: string) => {
            textRenderStyle.fontVariant = Number(value);
            assetsLoaded = false;
            textCanvas.fontCatalog.loadCharset(textSample, textRenderStyle).then(() => {
github heremaps / harp.gl / @here / harp-examples / src / textcanvas_path.ts View on Github external
textRenderStyle.backgroundColor!.g = guiOptions.backgroundColor.g / 255.0;
            textRenderStyle.backgroundColor!.b = guiOptions.backgroundColor.b / 255.0;
        });
        textStyleGui.add(textRenderStyle, "backgroundOpacity", 0.0, 1.0, 0.1);
        textStyleGui.add(guiOptions, "fontName").onFinishChange((value: string) => {
            textRenderStyle.fontName = value;
            assetsLoaded = false;
            textCanvas.fontCatalog.loadCharset(applicationCharset, textRenderStyle).then(() => {
                assetsLoaded = true;
            });
        });
        textStyleGui
            .add(textRenderStyle, "fontStyle", {
                Regular: FontStyle.Regular,
                Bold: FontStyle.Bold,
                Italic: FontStyle.Italic,
                BoldItalic: FontStyle.BoldItalic
            })
            .onChange((value: string) => {
                textRenderStyle.fontStyle = Number(value);
                assetsLoaded = false;
                textCanvas.fontCatalog.loadCharset(applicationCharset, textRenderStyle).then(() => {
                    assetsLoaded = true;
                });
            });
        textStyleGui
            .add(textRenderStyle, "fontVariant", {
                Regular: FontVariant.Regular,
                AllCaps: FontVariant.AllCaps,
                SmallCaps: FontVariant.SmallCaps
            })
            .onChange((value: string) => {
github heremaps / harp.gl / @here / harp-examples / src / textcanvas_layout.ts View on Github external
textRenderStyle.backgroundColor!.g = guiOptions.backgroundColor.g / 255.0;
            textRenderStyle.backgroundColor!.b = guiOptions.backgroundColor.b / 255.0;
        });
        textRenderStyleGui.add(textRenderStyle, "backgroundOpacity", 0.0, 1.0, 0.1);
        textRenderStyleGui.add(guiOptions, "fontName").onFinishChange((value: string) => {
            textRenderStyle.fontName = value;
            assetsLoaded = false;
            textCanvas.fontCatalog.loadCharset(textSample, textRenderStyle).then(() => {
                assetsLoaded = true;
            });
        });
        textRenderStyleGui
            .add(textRenderStyle, "fontStyle", {
                Regular: FontStyle.Regular,
                Bold: FontStyle.Bold,
                Italic: FontStyle.Italic,
                BoldItalic: FontStyle.BoldItalic
            })
            .onChange((value: string) => {
                textRenderStyle.fontStyle = Number(value);
                assetsLoaded = false;
                textCanvas.fontCatalog.loadCharset(textSample, textRenderStyle).then(() => {
                    assetsLoaded = true;
                });
            });
        textRenderStyleGui
            .add(textRenderStyle, "fontVariant", {
                Regular: FontVariant.Regular,
                AllCaps: FontVariant.AllCaps,
                SmallCaps: FontVariant.SmallCaps
            })
            .onChange((value: string) => {
github heremaps / harp.gl / @here / harp-examples / src / textcanvas_textBufferObject.ts View on Github external
textRenderStyle.backgroundColor!.g = guiOptions.backgroundColor.g / 255.0;
            textRenderStyle.backgroundColor!.b = guiOptions.backgroundColor.b / 255.0;
        });
        textRenderStyleGui.add(textRenderStyle, "backgroundOpacity", 0.0, 1.0, 0.1);
        textRenderStyleGui.add(guiOptions, "fontName").onFinishChange((value: string) => {
            textRenderStyle.fontName = value;
            assetsLoaded = false;
            textCanvas.fontCatalog.loadCharset(textSample, textRenderStyle).then(() => {
                assetsLoaded = true;
            });
        });
        textRenderStyleGui
            .add(textRenderStyle, "fontStyle", {
                Regular: FontStyle.Regular,
                Bold: FontStyle.Bold,
                Italic: FontStyle.Italic,
                BoldItalic: FontStyle.BoldItalic
            })
            .onChange((value: string) => {
                textRenderStyle.fontStyle = Number(value);
                assetsLoaded = false;
                textCanvas.fontCatalog.loadCharset(textSample, textRenderStyle).then(() => {
                    assetsLoaded = true;
                });
            });
        textRenderStyleGui
            .add(textRenderStyle, "fontVariant", {
                Regular: FontVariant.Regular,
                AllCaps: FontVariant.AllCaps,
                SmallCaps: FontVariant.SmallCaps
            })
            .onChange((value: string) => {
github heremaps / harp.gl / @here / harp-examples / src / textcanvas.ts View on Github external
textRenderStyle.backgroundColor!.r = guiOptions.backgroundColor.r / 255.0;
            textRenderStyle.backgroundColor!.g = guiOptions.backgroundColor.g / 255.0;
            textRenderStyle.backgroundColor!.b = guiOptions.backgroundColor.b / 255.0;
        });
        gui.add(textRenderStyle, "backgroundOpacity", 0.0, 1.0, 0.1);
        gui.add(guiOptions, "fontName").onFinishChange((value: string) => {
            textRenderStyle.fontName = value;
            assetsLoaded = false;
            textCanvas.fontCatalog.loadCharset(textSample, textRenderStyle).then(() => {
                assetsLoaded = true;
            });
        });
        gui.add(textRenderStyle, "fontStyle", {
            Regular: FontStyle.Regular,
            Bold: FontStyle.Bold,
            Italic: FontStyle.Italic,
            BoldItalic: FontStyle.BoldItalic
        }).onChange((value: string) => {
            textRenderStyle.fontStyle = Number(value);
            assetsLoaded = false;
            textCanvas.fontCatalog.loadCharset(textSample, textRenderStyle).then(() => {
                assetsLoaded = true;
            });
        });
        gui.add(textRenderStyle, "fontVariant", {
            Regular: FontVariant.Regular,
            AllCaps: FontVariant.AllCaps,
            SmallCaps: FontVariant.SmallCaps
        }).onChange((value: string) => {
            textRenderStyle.fontVariant = Number(value);
            assetsLoaded = false;
            textCanvas.fontCatalog.loadCharset(textSample, textRenderStyle).then(() => {