private void movePastTrailingNewline(String text, LineBreakMeasurer measurer) {
		int newPosition = measurer.getPosition();
		if (newPosition < text.length()) {
			char nextChar = text.charAt(newPosition);
			if (nextChar == '\n') {
				measurer.setPosition(newPosition + 1);
			}
		}
	}
Creates a text shaper with the given text, display size and graphics context.
@param text the text
@param displaySize the size
@param g2d the graphics
Ghidra/Framework/Docking/src/main/java/docking/util/TextShaper.java