Gets the first glyph in the map that is not a space character
@private
@name _getFirstGlyph
@memberOf me.BitmapTextData
@function
@returns {me.Glyph}
336087
function _getFirstGlyph() {
         var keys = Object.keys(this.glyphs);

         for (var i = 0; i < keys.length; i++) {
           if (keys[i] > 32) {
             return this.glyphs[keys[i]];
           }
         }

         return null;
       }
297157
function getFirstCharIndex(font) {
  return Math.max(0, Math.min(0xffff, Math.abs(_.minBy(Object.keys(font.codePoints), function (point) {
    return parseInt(point, 10);
  }))));
}
115073
def _init_glyph(self, plot, mapping, properties):
        
        ret = super(ColorbarPlot, self)._init_glyph(plot, mapping, properties)
        if self.colorbar:
            for k, v in list(self.handles.items()):
                if not k.endswith('color_mapper'):
                    continue
                self._draw_colorbar(plot, v, k[:-12])
        return ret
572918
function glyphDataSize(glyph) {
  // Ignore glyphs without outlines. These will get a length of zero in the “loca” table
  if (!glyph.contours.length) {
    return 0;
  }

  var result = 12; //glyph fixed properties

  result += glyph.contours.length * 2; //add contours

  _.forEach(glyph.ttf_x, function (x) {
    //add 1 or 2 bytes for each coordinate depending of its size
    result += ((-0xFF <= x && x <= 0xFF)) ? 1 : 2;
  });

  _.forEach(glyph.ttf_y, function (y) {
    //add 1 or 2 bytes for each coordinate depending of its size
    result += ((-0xFF <= y && y <= 0xFF)) ? 1 : 2;
  });

  // Add flags length to glyph size.
  result += glyph.ttf_flags.length;

  if (result % 4 !== 0) { // glyph size must be divisible by 4.
    result += 4 - result % 4;
  }
  return result;
}
540346
function getIconUnicode(name) {
  let unicode = String.fromCharCode(startUnicode++);
  UnicodeObj[name] = unicode;
  return [unicode];
}
372890
def getCharStringForGlyph(self, glyph, private, globalSubrs):
        
        width = glyph.width
        defaultWidth = private.defaultWidthX
        nominalWidth = private.nominalWidthX
        if width == defaultWidth:
            # if width equals the default it can be omitted from charstring
            width = None
        else:
            # subtract the nominal width
            width -= nominalWidth
        if width is not None:
            width = otRound(width)
        pen = T2CharStringPen(width, self.allGlyphs,
                              roundTolerance=self.roundTolerance)
        glyph.draw(pen)
        charString = pen.getCharString(
            private, globalSubrs, optimize=self.optimizeCFF
        )
        return charString
1227213
function getFirstFont(fonts, skipSystemFonts) {
  let regularFont = undefined;
  let systemFont = undefined;

  fonts.split(',').forEach(font => {
    font = font.trim().replace(/^["']+|["']+$/g, '');
    if (font === '') {
      return;
    }

    // See above for a note on OS-specific fonts
    if (!regularFont && (!skipSystemFonts || SYSTEM_FONTS.indexOf(font) < 0)) {
      regularFont = font;
    }
    if (!systemFont) {
      systemFont = font;
    }
  });

  if (regularFont) {
    return regularFont;
  }

  if (systemFont) {
    return systemFont;
  }

  return '-apple-system';
}
375654
def _init_glyph(self, plot, mapping, properties):
        
        properties = mpl_to_bokeh(properties)
        plot_method = self._plot_methods.get('batched' if self.batched else 'single')
        if isinstance(plot_method, tuple):
            # Handle alternative plot method for flipped axes
            plot_method = plot_method[int(self.invert_axes)]
        renderer = getattr(plot, plot_method)(**dict(properties, **mapping))
        return renderer, renderer.glyph
698571
function() {
		var str = this.trim();
		str = this.charAt(0).toUpperCase() + this.slice(1);
		if (!str.match(/[?!\.]$/)) str = str+'.';
		return str;
	}
48595
private void createGlyf(FontFileReader in,
                            Map glyphs) throws IOException {
        TTFDirTabEntry entry = (TTFDirTabEntry)dirTabs.get("glyf");
        int size = 0;
        int start = 0;
        int endOffset = 0;    // Store this as the last loca
        if (entry != null) {
            pad4();
            start = currentPos;

            /* Loca table must be in order by glyph index, so build
             * an array first and then write the glyph info and
             * location offset.
             */
            int[] origIndexes = new int[glyphs.size()];

            Iterator e = glyphs.keySet().iterator();
            while (e.hasNext()) {
                Integer origIndex = (Integer)e.next();
                Integer subsetIndex = (Integer)glyphs.get(origIndex);
                origIndexes[subsetIndex.intValue()] = origIndex.intValue();
            }

            for (int i = 0; i < origIndexes.length; i++) {
                int glyphLength = 0;
                int nextOffset = 0;
                int origGlyphIndex = origIndexes[i];
                if (origGlyphIndex >= (mtxTab.length - 1)) {
                    nextOffset = (int)lastLoca;
                } else {
                    nextOffset = (int)mtxTab[origGlyphIndex + 1].getOffset();
                }
                glyphLength = nextOffset - (int)mtxTab[origGlyphIndex].getOffset();

                // Copy glyph
                System.arraycopy(
                    in.getBytes((int)entry.getOffset() + (int)mtxTab[origGlyphIndex].getOffset(),
                        glyphLength), 0,
                    output, currentPos,
                    glyphLength);


                // Update loca table
                writeULong(locaOffset + i * 4, currentPos - start);
                if ((currentPos - start + glyphLength) > endOffset) {
                    endOffset = (currentPos - start + glyphLength);
                }

                currentPos += glyphLength;
                realSize += glyphLength;

            }

            size = currentPos - start;

            int checksum = getCheckSum(start, size);
            writeULong(glyfDirOffset, checksum);
            writeULong(glyfDirOffset + 4, start);
            writeULong(glyfDirOffset + 8, size);
            currentPos += 12;
            realSize += 12;

            // Update loca checksum and last loca index
            writeULong(locaOffset + glyphs.size() * 4, endOffset);

            checksum = getCheckSum(locaOffset, glyphs.size() * 4 + 4);
            writeULong(locaDirOffset, checksum);
        } else {
            throw new IOException("Can't find glyf table");
        }
    }
977693
function escapeSpecial(value) {
    let specialMaps = {
        '&lt;': '<',
        '&gt;': '>',
        '&quote;': '"',
        '&#39;': '\''
    };
    for (let n in specialMaps) {
        value = value.replace(new RegExp(n, 'g'), specialMaps[n]);
    }
    return value;
}
87116
protected Rectangle2D getBounds(char[] glyph, int notationContext) {
		String key = String.valueOf(notationContext)
			+ "-" + String.valueOf(glyph)
			+ "-" + getMusicalFont().getName();
		try {
			if (bounds.get(key) == null) {
				FontRenderContext frc = g2.getFontRenderContext();
				bounds.put(key, new TextLayout(
						String.valueOf(glyph),//new Character(glyph[0]).toString(),
						getNotationFontForContext(notationContext),
						frc).getBounds());
			}
			return (Rectangle2D) (bounds.get(key));
		} catch (RuntimeException e) {
			System.err.println(e.getMessage() + " key="+key);
			throw e;
		}
	}
729355
function getPrefix() {
    var validPrefix = 'abcdef';
    return validPrefix.charAt(Math.floor(Math.random() * validPrefix.length));
  }
449128
function firstNonBlankChar(lineIndex) {
				var model = view.getModel();
				var lineText = model.getLine(lineIndex);
				var offsetInLine = 0;
				var c = lineText.charCodeAt(offsetInLine);
				while (c === 32 || c === 9) {
					offsetInLine++;
					c = lineText.charCodeAt(offsetInLine);
				}
				return offsetInLine;
			}
1275683
private Point2D getGlyphCenter(final int index) {

        if (text.length() == 1) return getCenter();

        final Shape glyph = glyphs.getGlyphOutline(index);
        final Rectangle2D glyphBounds = transformedBounds(glyph);

        return new Point2D.Double(glyphBounds.getCenterX(), glyphBounds.getCenterY());
    }
672353
function () {
                var self = this;
                return '#' + padding2(Number(self.get('r')).toString(16)) + padding2(Number(self.get('g')).toString(16)) + padding2(Number(self.get('b')).toString(16));
            }
270551
function( str ){
      var first, last;

      // find first non-space char
      for( first = 0; first < str.length && str[first] === ' '; first++ ){}

      // find last non-space char
      for( last = str.length - 1; last > first && str[last] === ' '; last-- ){}

      return str.substring(first, last + 1);
    }