private void drawString(String line, float xPos, float yPos, float charWidth, float charHeight, float xGap) {
        renderEngine.bindMaterial(fontMaterial);
        if (isRotated) {
            glPushMatrix();
            glTranslatef(((xPos + getStringWidth(line)) / 2), ((yPos + charHeight) / 2), 0);
            if (isRotated)
                glRotatef(rotation, 0, 0, 1);
            glTranslatef(-((xPos + getStringWidth(line)) / 2), -((yPos + charHeight) / 2), 0);
        }
        glBegin(GL_QUADS);
        if (!forceUseGL) {
            if (currentColor != null) {
                glColor4f(currentColor.getRed(), currentColor.getGreen(), currentColor.getBlue(), currentColor.getAlpha());
            } else {
                glColor4f(0.0F, 0.0F, 0.0F, 1.0F);
            }
        }
        for (int i = 0; i < line.length(); i++) {
            int code = (int) line.charAt(i);
            float dec = xGap;
            try {
                if (line.charAt(i) == ' ') {
                    dec = CHAR_WIDTH - 95;
                } else {
                    dec = xGap;
                }
            } catch (StringIndexOutOfBoundsException e) {
                e.printStackTrace();
            }

            int gridX = code % 16;
            int gridY = (code - gridX) / 16;
            float texX = (float) gridX / 16;
            float texY = (float) gridY / 16;

            glTexCoord2f(texX, texY);
            glVertex2f(((dec + charWidth) * i) + xPos, yPos - charHeight);

            glTexCoord2f(texX, texY + (1f / 16f));
            glVertex2f(((dec + charWidth) * i) + xPos, yPos);

            glTexCoord2f(texX + (1f / 16f), texY + (1f / 16f));
            glVertex2f(((dec + charWidth) * i) + xPos + charWidth, yPos);

            glTexCoord2f(texX + (1f / 16f), texY);
            glVertex2f(((dec + charWidth) * i) + xPos + charWidth, yPos - charHeight);
        }
        glEnd();
        if (isRotated) {
            glPopMatrix();
            isRotated = false;
        }
        glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    }