chunkText[currentPos] = '?';
chunkText[currentPos] = MISSING_CHAR;
	private Chunk buildChunk()	{		if (encounteredReturn)		{			encounteredReturn = false;			chunkStartPos ++;			return Chunk.HARD_LINE_BREAK;		}				while (++currentPos < chunkText.length)		{				if (chunkText[currentPos] == '\n')			{					// If the first character of a chunk is return carriage, return a 				// Chunk.HARD_LINE_BREAK directly.				if (null == lastFontInfo)				{					chunkStartPos = currentPos + 1;					return Chunk.HARD_LINE_BREAK;				}				encounteredReturn = true;				Chunk c = new Chunk(new String(chunkText, chunkStartPos, currentPos-chunkStartPos), 				baseOffset + chunkStartPos, baseLevel, runDirection, lastFontInfo);				chunkStartPos = currentPos;				return c;			}			//We fail to find a font to display the character,			//we replace this character with '?'.			if (!fh.selectFont(chunkText[currentPos]))			{				chunkText[currentPos] = '?';			}			//If a character uses a font different from the previous character,			//we split the chunk at the point.			if (fh.isFontChanged())			{				//For the first character of the chunk, although the font has changed,				//we will just omit it rather than build a blank chunk.				if (null == lastFontInfo)				{					lastFontInfo = fh.getFontInfo();					continue;				}				Chunk c = new Chunk(new String(chunkText, chunkStartPos, currentPos-chunkStartPos), 						baseOffset + chunkStartPos, baseLevel, runDirection, lastFontInfo);				chunkStartPos = currentPos;				lastFontInfo = fh.getFontInfo();				return c;			}		}				//currentPos reaches the end of the input chunk. 		if (currentPos >= chunkText.length -1)		{			Chunk c = new Chunk(new String(chunkText, chunkStartPos, chunkText.length - chunkStartPos),					baseOffset + chunkStartPos, baseLevel, runDirection, lastFontInfo);			chunkStartPos = currentPos + 1;			return c;			}		else		{			return null;		}	}