Package org.pentaho.reporting.libraries.fonts.encoding

Examples of org.pentaho.reporting.libraries.fonts.encoding.CodePointBuffer


    if (metaData == null)
    {
      throw new NullPointerException();
    }

    this.codePointBuffer = new CodePointBuffer(400);
    this.driver = driver;
    this.encoding = encoding;
    characterHeightInMicroPoint = StrictGeomUtility.toInternalValue(metaData.getNumericFeatureValue(
        TextOutputProcessorMetaData.CHAR_HEIGHT));
    characterWidthInMicroPoint = StrictGeomUtility.toInternalValue(metaData.getNumericFeatureValue(
View Full Code Here


  }

  public String getRawText()
  {
    final GlyphList gs = getGlyphs();
    return gs.getText(offset, length, new CodePointBuffer(length));
  }
View Full Code Here

  public CodePointBuffer decode(final ByteBuffer text, CodePointBuffer buffer)
  {
    final int textLength = text.getLength();
    if (buffer == null)
    {
      buffer = new CodePointBuffer(textLength);
    }
    else if (buffer.getLength() < textLength)
    {
      buffer.ensureSize(textLength);
    }
View Full Code Here

          throws EncodingException
  {
    final int textLength = text.getLength();
    if (buffer == null)
    {
      buffer = new CodePointBuffer(textLength);
    }
    else if (buffer.getLength() < textLength)
    {
      buffer.ensureSize(textLength);
    }
View Full Code Here

  public CodePointBuffer decode (final ByteBuffer text, CodePointBuffer buffer)
  {
    final int textLength = text.getLength();
    if (buffer == null)
    {
      buffer = new CodePointBuffer(textLength / 2);
    }
    else if ((buffer.getLength() / 2) < textLength)
    {
      buffer.ensureSize(textLength / 2);
    }
View Full Code Here

  public CodePointBuffer decode (final char[] chars, final int offset, final int length, CodePointBuffer buffer)
  {
    if (buffer == null)
    {
      buffer = new CodePointBuffer(length);
    }
    else if ((buffer.getLength()) < length)
    {
      buffer.ensureSize(length);
    }
View Full Code Here

  public CodePointBuffer decode(final ByteBuffer text, CodePointBuffer buffer)
  {
    final int textLength = text.getLength();
    if (buffer == null)
    {
      buffer = new CodePointBuffer(textLength);
    }
    else if (buffer.getLength() < textLength)
    {
      buffer.ensureSize(textLength);
    }
View Full Code Here

          throws EncodingException
  {
    final int textLength = text.getLength();
    if (buffer == null)
    {
      buffer = new CodePointBuffer(textLength);
    }
    else if (buffer.getLength() < textLength)
    {
      buffer.ensureSize(textLength);
    }
View Full Code Here

    else
    {
      enc = EncodingRegistry.getInstance().getEncoding(encoding);
    }
    final ByteBuffer byteBuffer = new ByteBuffer(data, pos, length);
    final CodePointBuffer cp = enc.decode(byteBuffer, null);
    return Utf16LE.getInstance().encodeString(cp);
  }
View Full Code Here

  {
  }

  public void testGraphemeClusterGenerationWindows()
  {
    CodePointBuffer buffer = Utf16LE.getInstance().decodeString("T\r\n\r\n\r\nT", null); //$NON-NLS-1$
    final int[] data = buffer.getBuffer();
    final boolean[] result = new boolean[]
    {
        true, true, false, true, false, true, false, true
    };
    GraphemeClusterProducer prod = new GraphemeClusterProducer();

    for (int i = 0; i < buffer.getLength(); i++)
    {
      final int codepoint = data[i];
      if (prod.createGraphemeCluster(codepoint) != result[i])
      {
        TestCase.fail();
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.fonts.encoding.CodePointBuffer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.