Whitespace glyphs have ink?
503200
def com_google_fonts_check_whitespace_ink(ttFont):
  """"""
  from fontbakery.utils import get_glyph_name, glyph_has_ink

  # code-points for all "whitespace" chars:
  WHITESPACE_CHARACTERS = [
      0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x0020, 0x0085, 0x00A0, 0x1680,
      0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008,
      0x2009, 0x200A, 0x2028, 0x2029, 0x202F, 0x205F, 0x3000, 0x180E, 0x200B,
      0x2060, 0xFEFF
  ]
  failed = False
  for codepoint in WHITESPACE_CHARACTERS:
    g = get_glyph_name(ttFont, codepoint)
    if g is not None and glyph_has_ink(ttFont, g):
      failed = True
      yield FAIL, ("Glyph \"{}\" has ink."
                   " It needs to be replaced by"
                   " an empty glyph.").format(g)
  if not failed:
    yield PASS, "There is no whitespace glyph with ink."
116349
private void renderGlyph(Glyph glyph, int width, int height) throws SlickException {
		// Draw the glyph to the scratch image using Java2D.
		scratchGraphics.setComposite(AlphaComposite.Clear);
		scratchGraphics.fillRect(0, 0, MAX_GLYPH_SIZE, MAX_GLYPH_SIZE);
		scratchGraphics.setComposite(AlphaComposite.SrcOver);
		scratchGraphics.setColor(java.awt.Color.white);
		for (Iterator iter = unicodeFont.getEffects().iterator(); iter.hasNext();)
			((Effect)iter.next()).draw(scratchImage, scratchGraphics, unicodeFont, glyph);
		glyph.setShape(null); // The shape will never be needed again.

		WritableRaster raster = scratchImage.getRaster();
		int[] row = new int[width];
		for (int y = 0; y < height; y++) {
			raster.getDataElements(0, y, width, 1, row);
			scratchIntBuffer.put(row);
		}
		GL.glTexSubImage2D(SGL.GL_TEXTURE_2D, 0, pageX, pageY, width, height, SGL.GL_BGRA, SGL.GL_UNSIGNED_BYTE,
			scratchByteBuffer);
		scratchIntBuffer.clear();

		glyph.setImage(pageImage.getSubImage(pageX, pageY, width, height));
	}
1213743
protected int getGlyphWidth(int glyph) {
        if (glyph >= GlyphWidths.length)
            glyph = GlyphWidths.length - 1;
        return GlyphWidths[glyph];
    }
766040
static boolean isEmptyWhitespace(@Nullable final String s) {
        if (s == null) {
            return true;
        }
        return CharMatcher.WHITESPACE.matchesAllOf(s);
    }
803020
function () {
            var indentStr = '';
            for (var i = 0; i < indentLevel; i++) {
                indentStr += INDENT;
            }
            return {
                type: 'WhiteSpace',
                value: indentStr
            };
        }
215559
function getGlyphs($originalGlyphIdx, &$start, &$glyphSet, &$subsetglyphs)
	{
		$glyphPos = $this->glyphPos[$originalGlyphIdx];
		$glyphLen = $this->glyphPos[$originalGlyphIdx + 1] - $glyphPos;
		if (!$glyphLen) {
			return;
		}
		$this->seek($start + $glyphPos);
		$numberOfContours = $this->read_short();
		if ($numberOfContours < 0) {
			$this->skip(8);
			$flags = GlyphOperator::MORE;
			while ($flags & GlyphOperator::MORE) {
				$flags = $this->read_ushort();
			}
			$glyphIdx = $this->read_ushort();
			if (!isset($glyphSet[$glyphIdx])) {
				$glyphSet[$glyphIdx] = count($subsetglyphs); // old glyphID to new glyphID
				$subsetglyphs[$glyphIdx] = true;
			}
			$savepos = ftell($this->fh);
			$this->getGlyphs($glyphIdx, $start, $glyphSet, $subsetglyphs);
			$this->seek($savepos);
			if ($flags & GlyphOperator::WORDS) {
				$this->skip(4);
			} else {
				$this->skip(2);
			}
			if ($flags & GlyphOperator::SCALE) {
				$this->skip(2);
			} else {
				if ($flags & GlyphOperator::XYSCALE) {
					$this->skip(4);
				} else {
					if ($flags & GlyphOperator::TWOBYTWO) {
						$this->skip(8);
					}
				}
			}
		}
	}
308776
private void scribbleWhiteSpace(WsByteBuffer buffer, int start, int stop) {
        if (buffer.hasArray()) {
            // buffer has a backing array so directly update that
            final byte[] data = buffer.array();
            final int offset = buffer.arrayOffset();
            int myStart = start + offset;
            int myStop = stop + offset;
            for (int i = myStart; i < myStop; i++) {
                data[i] = BNFHeaders.SPACE;
            }
        } else {
            // overlay whitespace into the buffer
            byte[] localWhitespace = whitespace;
            if (null == localWhitespace) {
                localWhitespace = getWhiteSpace();
            }
            buffer.position(start);
            int len = stop - start;
            while (len > 0) {
                if (localWhitespace.length >= len) {
                    buffer.put(localWhitespace, 0, len);
                    break; // out of while
                }
                int partial = localWhitespace.length;
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Scribbling " + partial + " bytes of whitespace");
                }
                buffer.put(localWhitespace, 0, partial);
                len -= partial;
            }
        }
    }
1325759
protected boolean isAllWhiteSpace(CharSequence sb) {
        boolean result = true;
        for (int i = 0; i < sb.length(); i++) {
            char c = sb.charAt(i);

            if (!Character.isWhitespace(c)) {
                return false;
            }
        }
        return result;
    }
133279
public void skipWhitespaces() {
    for (int i = mark; i < chars.length; i++) {
      if (Character.isWhitespace(chars[i])) {
        mark++;
      } else {
        break;
      }
    }
  }
1333612
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;
    }
42846
def collate_fonts_data(fonts_data):
    """"""
    glyphs = {}

    for family in fonts_data:
        for glyph in family:
            if glyph['unicode'] not in glyphs:
                glyphs[glyph['unicode']] = glyph
            else:
                c = glyphs[glyph['unicode']]['contours']
                glyphs[glyph['unicode']]['contours'] = c | glyph['contours']
    return glyphs.values()
203534
def contains_bad_glyph(glyph_data, data):
    

    def check_glyph(char):
        for cmap in glyph_data["cmap"].tables:
            if cmap.isUnicode():
                if char in cmap.cmap:
                    return True
        return False

    for part in data:
        text = part.get("full_text", "")
        try:
            # for python 2
            text = text.decode("utf8")
        except AttributeError:
            pass

        for char in text:
            if not check_glyph(ord(char)):
                # we have not found a character in the font
                print(u"%s (%s) missing" % (char, ord(char)))
                return True
    return False
833768
function markSpacesAndComments(tokens) {
  var tokensLength = tokens.length;
  var spaces = [-1, -1];
  var type; // Current token's type

  // For every token in the token list, mark spaces and line breaks
  // as spaces (set both `ws` and `sc` flags). Mark multiline comments
  // with `sc` flag.
  // If there are several spaces or tabs or line breaks or multiline
  // comments in a row, group them: take the last one's index number
  // and save it to the first token in the group as a reference:
  // e.g., `ws_last = 7` for a group of whitespaces or `sc_last = 9`
  // for a group of whitespaces and comments.
  for (var i = 0; i < tokensLength; i++) {
    type = tokens[i].type;

    if (type === TokenType.Space ||
        type === TokenType.Tab ||
        type === TokenType.Newline) {
      markSpace(tokens, i, spaces);
    } else if (type === TokenType.CommentML) {
      markComment(tokens, i, spaces);
    } else {
      markEndOfSpacesAndComments(tokens, i, spaces);
    }
  }

  markEndOfSpacesAndComments(tokens, i, spaces);
}
655877
public static boolean isAllWhitespace(CharSequence self) {
        String s = self.toString();
        for (int i = 0; i < s.length(); i++) {
            if (!Character.isWhitespace(s.charAt(i)))
                return false;
        }
        return true;
    }
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;
            }
        }
461597
@Override
	public boolean isWhitespace() {
		if (type != TEXT && type != IGNORABLE_WHITESPACE && type != CDSECT) {
			throw new KriptonRuntimeException(ILLEGAL_TYPE, true, this.getLineNumber(), this.getColumnNumber(), getPositionDescription(), null);
		}
		return isWhitespace;
	}
215144
@Override
    public boolean isWhiteSpace()
    {
        final int currToken = mCurrToken;
        if (currToken == CHARACTERS || currToken == CDATA) {
            if (mTokenState < mStTextThreshold) {
                safeFinishToken();
            }
            if (mWsStatus == ALL_WS_UNKNOWN) {
                mWsStatus = mTextBuffer.isAllWhitespace() ?
                    ALL_WS_YES : ALL_WS_NO;
            }
            return mWsStatus == ALL_WS_YES;
        }
        return (currToken == SPACE);
    }