} else if (line.startsWith("IsFixedPitch") && line.toLowerCase().indexOf("true") >= 0) { mIsFixedPitch = true;
	public AdobeFontMetrics (BufferedReader r, String filename, HashSet ISOLatin1EncodedFonts)		throws IOException, MapyrusException	{		String line;		boolean inCharMetrics = false;		boolean finishedParsing = false;		StringTokenizer st;		boolean convertToISOLatin1 = false;		// TODO handle fonts with more than 256 characters. 		mCharWidths = new short[256];		try		{			line = r.readLine();			if (line == null || (!line.startsWith("StartFontMetrics")))			{				throw new MapyrusException(MapyrusMessages.get(MapyrusMessages.NOT_A_AFM_FILE) +					": " + filename);			}			while ((!finishedParsing) && line != null)			{				if (line.startsWith("FontName"))				{					st = new StringTokenizer(line);					if (st.countTokens() < 2)					{						throw new MapyrusException(MapyrusMessages.get(MapyrusMessages.NOT_A_AFM_FILE) +							": " + filename);					}					st.nextToken();	/* FontName */					mFontName = st.nextToken();					convertToISOLatin1 = ISOLatin1EncodedFonts.contains(mFontName);				}				else if (line.startsWith("FontBBox"))				{					st = new StringTokenizer(line);					if (st.countTokens() < 5)					{						throw new MapyrusException(MapyrusMessages.get(MapyrusMessages.NOT_A_AFM_FILE) +							": " + filename);					}					st.nextToken();					st.nextToken(); /* xMin */					st.nextToken();	/* yMin */					int xMax = Integer.parseInt(st.nextToken());					mCharWidth = xMax;				}				else if (line.startsWith("StartCharMetrics"))				{					inCharMetrics = true;				}				else if (line.startsWith("EndCharMetrics"))				{					inCharMetrics = false;					finishedParsing = true;				}				else if (inCharMetrics && line.startsWith("C"))				{					st = new StringTokenizer(line, " ;");					if (st.countTokens() < 6)					{						throw new MapyrusException(MapyrusMessages.get(MapyrusMessages.NOT_A_AFM_FILE) +							": " + filename);					}					st.nextToken();	/* "C" */					int charIndex = Integer.parseInt(st.nextToken());					st.nextToken();	/* "WX" */					short charWidth = Short.parseShort(st.nextToken());					st.nextToken(); /* N */					String charName = st.nextToken();										/*					 * Lookup index in ISOLatin1 encoding for this character.					 */					if (convertToISOLatin1 && (charIndex < 0 || charIndex > 127))					{						Integer i = (Integer)mISOLatin1CharIndexes.get(charName);						if (i != null)							charIndex = i.intValue();					}					if (charIndex >= 0 && charIndex < mCharWidths.length)					{						mCharWidths[charIndex] = charWidth;					}				}				line = r.readLine();			}		}		catch (NumberFormatException e)		{			throw new MapyrusException(MapyrusMessages.get(MapyrusMessages.NOT_A_AFM_FILE) +				": " + filename + ": " + e.getMessage());		}	}