How to use the webfont.renderPicker function in webfont

To help you get started, we’ve selected a few webfont 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 adobe / brackets-edge-web-fonts / main.js View on Github external
function handleFontChosen() {
                if (lastFontSelected) {
                    _insertFontCompletionAtCursor(lastFontSelected, editor, cursor);
                }
                $(webfont).off("ewfFontChosen");
            }
            
            var dlg = Dialogs.showModalDialogUsingTemplate(ewfBrowseDialogTemplate);
            dlg.done(function (id) {
                if (id === Dialogs.DIALOG_BTN_OK) {
                    handleFontChosen();
                }
                editor.focus();
            });

            webfont.renderPicker($('.edge-web-fonts-browse-dialog.instance'));
            
            $(webfont).on("ewfFontChosen", function () {
                dlg.close();
                handleFontChosen();
                editor.focus();
            });
        }

webfont

Generator of fonts from svg icons, svg icons to svg font, svg font to ttf, ttf to eot, ttf to woff, ttf to woff2

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis