return an instance of GlyphButton with a glyph defined by string or index
@param string|int $glyph
@return \Ajax\bootstrap\html\HtmlGlyphicon
504921
public static function getGlyphicon($glyph) {
		$result=new HtmlGlyphicon("");
		if (is_int($glyph)) {
			$glyphs=CssGlyphicon::getConstants();
			if ($glyph<sizeof($glyphs)) {
				$glyph=array_values($glyphs)[$glyph];
			}
		}
		$result->setGlyphicon($glyph);
		return $result;
	}
86230
public static function icon($icon, $htmlOptions = array(), $tagName = 'span')
    {
        if (is_string($icon)) {
            if (strpos($icon, 'glyphicon-') === false) {
                $icon = 'glyphicon-' . implode(' glyphicon-', explode(' ', $icon));
            }
            self::addCssClass(array('glyphicon', $icon), $htmlOptions);
            $color = TbArray::popValue('color', $htmlOptions);
            if (!empty($color) && $color === self::ICON_COLOR_WHITE) {
                self::addCssClass("glyphicon-white", $htmlOptions);
            }
            return self::openTag($tagName, $htmlOptions) . parent::closeTag($tagName); // tag won't work in this case
        }
        return '';
    }
1283336
protected function tokenizeGlobalExclusions($html)
    {
        $html              = (string) $html;
        $_this             = $this;
        $global_exclusions = [
            '/\<noscript(?:\s[^>]*)?\>.*?\<\/noscript\>/uis',
        ];
        $html = preg_replace_callback(
            $global_exclusions,
            function ($m) use ($_this) {
                $_this->current_global_exclusion_tokens[] = $m[0]; // Tokenize.
                return '<htmlc-gxt-'.(count($_this->current_global_exclusion_tokens) - 1).' />';
            },
            $html // Exclusions replaced by tokens.
        );
        return $html;
    }
989743
public function get($string)
    {
        $lowercase = strtolower($string);

        if (!parent::has($lowercase))
        {
            if (isset($this->_aliases[$lowercase])) {
                $key = $this->_aliases[$lowercase];
            }
            else if(!JFactory::getLanguage()->hasKey($string))
            {
                if (substr($string, 0, strlen($this->getPrefix())) === $this->getPrefix()) {
                    $key = $string;
                } else {
                    //Gets a key from the catalogue and prefixes it
                    $key = $this->getPrefix().$this->generateKey($string);
                }
            }
            else $key = $string;

            $this->set($lowercase, JFactory::getLanguage()->_($key));
        }

        return parent::get($lowercase);
    }
852422
function glyphStrip(ttf, glyphs) {
    // reference git: be5invis/node-sfnt/lib/ttf/ttf.js
    function getStringGlyfs(ttf, str) {
        let glyphs = [];
        let indexList = ttf.findGlyf({ unicode: str.split('').map(toCharCode) })
        if (indexList.length) glyphs = ttf.getGlyf(indexList);
        glyphs.unshift(ttf.get().glyf[0]);
        return glyphs;
    }
    let ttfObj = new TTF.TTF(ttf)
    ttfObj.setGlyf(getStringGlyfs(ttfObj, glyphs))
    return ttfObj.get()
}
1006003
public static function icon($icon, $type = self::FONT_AWESOME)
    {
        $class = null;

        if ($type === self::FONT_AWESOME) {
            $class = 'fa fa-' . $icon;

        }
        else if ($type === self::FONT_BOOTSTRAP) {
            $class = 'glyphicon glyphicon-' . $icon;
        }
        else {
            $class = $icon;
        }

        return self::tag('i', '', $class, '');
    }
617602
function () {
            var spaceCharCode = " ".charCodeAt(0);
            var glyph = this.glyphs[spaceCharCode];
            if (!glyph) {
                glyph = new Glyph();
                glyph.id = spaceCharCode;
                glyph.xadvance = this._getFirstGlyph().xadvance;
                this.glyphs[spaceCharCode] = glyph;
            }
        }
821740
public static function get($symbol)
    {

        $symbol = strtolower($symbol);

        if (isset(static::$dictionary[$symbol]))
            return static::$dictionary[$symbol];
        else
            return false;
    }
80105
public function glyph( $char ) {
		$uChar = json_decode( sprintf( '"\u%s"', $char ), false );
		$this->name( $uChar );

		return $this;
	}
2096
protected function bootstrapGlyphicon($name, $style) {

        $attributes = [];

        $attributes["class"][]     = "glyphicon";
        $attributes["class"][]     = null !== $name ? "glyphicon-" . $name : null;
        $attributes["aria-hidden"] = "true";
        $attributes["style"]       = $style;

        return static::coreHTMLElement("span", null, $attributes);
    }
766780
public function setFont($font) {

		if(false === is_string($font)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($font)), E_USER_ERROR);
		}

		$file = new File($font);

		if(false === $file -> exists()) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be an existing font', __METHOD__), E_USER_ERROR);
		}

		$this -> font = $file;

		return $this;
	}
952222
public static void loadGlyphsFont(InputStream stream, String keyPrefix) throws IOException {
        try {
            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();

            docBuilder.setEntityResolver((publicId, systemId) -> {
                // disable dtd entites at runtime
                return new InputSource(new StringReader(""));
            });

            Document doc = docBuilder.parse(stream);
            doc.getDocumentElement().normalize();

            NodeList glyphsList = doc.getElementsByTagName("glyph");
            for (int i = 0; i < glyphsList.getLength(); i++) {
                Node glyph = glyphsList.item(i);
                Node glyphName = glyph.getAttributes().getNamedItem("glyph-name");
                if (glyphName == null) {
                    continue;
                }

                String glyphId = glyphName.getNodeValue();
                SVGGlyphBuilder glyphPane = new SVGGlyphBuilder(i,
                    glyphId,
                    glyph.getAttributes()
                        .getNamedItem("d")
                        .getNodeValue());
                glyphsMap.put(keyPrefix + "." + glyphId, glyphPane);
            }
            stream.close();
        } catch (ParserConfigurationException | SAXException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
372353
public function addGlyph(Vector $v, $identifier = null) {
		$v = $v->getCopy();
		$v->setIdentifier($identifier);
		$this->glyphs[] = $v;
		return $this;
	}
866440
function resolve($emoji) {
        if($emoji instanceof \CharlotteDunois\Yasmin\Models\Emoji) {
            return $emoji;
        }
        
        if($emoji instanceof \CharlotteDunois\Yasmin\Models\MessageReaction) {
            return $emoji->emoji;
        }
        
        if(\is_int($emoji)) {
            $emoji = (string) $emoji;
        }
        
        if(\is_string($emoji) && parent::has($emoji)) {
            return parent::get($emoji);
        }
        
        throw new \InvalidArgumentException('Unable to resolve unknown emoji');
    }
174432
private void initPortIdToGlyphMap(List<Glyph> glyphs)
    {
        for(Glyph glyph: glyphs)
        {
            for(Port p: glyph.getPort())
            {
                portIDToOwnerGlyph.put(p.getId(), glyph );
            }
            if(glyph.getGlyph().size() > 0)
                initPortIdToGlyphMap(glyph.getGlyph());
        }
    }
1075784
protected function getGoogleFontService()
    {
        if ($this->googleFontService === null) {
            $this->googleFontService = GeneralUtility::makeInstance(GoogleFontService::class);
        }
        return $this->googleFontService;
    }
10303
protected function getGlyphs($char, $type)
    {

        $pos = mb_strpos($this->_glyphs, $char);
        
        if ($pos > 49) {
            $pos = ($pos-49)/2 + 49;
        }
        
        $pos = $pos*16 + $type*4;
        
        return substr($this->_hex, $pos, 4);
    }