org.apache.poi.hslf.record
Class FontEntityAtom

java.lang.Object
  extended by org.apache.poi.hslf.record.Record
      extended by org.apache.poi.hslf.record.RecordAtom
          extended by org.apache.poi.hslf.record.FontEntityAtom

public class FontEntityAtom
extends RecordAtom

This atom corresponds exactly to a Windows Logical Font (LOGFONT) structure. It keeps all the information needed to define the attributes of a font, such as height, width, etc. For more information, consult the Windows API Programmer's reference.

Author:
Yegor Kozlov

Field Summary
 
Fields inherited from class org.apache.poi.hslf.record.Record
logger
 
Constructor Summary
protected FontEntityAtom()
          Create a new instance of FontEntityAtom
protected FontEntityAtom(byte[] source, int start, int len)
          Build an instance of FontEntityAtom from on-disk data
 
Method Summary
protected  int getFontIndex()
           
 java.lang.String getFontName()
          A null-terminated string that specifies the typeface name of the font.
 long getRecordType()
          Returns the type (held as a little endian in bytes 3 and 4) that this class handles
protected  void setFontIndex(int idx)
           
 void setFontName(java.lang.String name)
          Set the name of the font.
 void writeOut(java.io.OutputStream out)
          Write the contents of the record back, so it can be written to disk
 
Methods inherited from class org.apache.poi.hslf.record.RecordAtom
getChildRecords, isAnAtom
 
Methods inherited from class org.apache.poi.hslf.record.Record
buildRecordAtOffset, createRecordForType, findChildRecords, writeLittleEndian, writeLittleEndian
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontEntityAtom

protected FontEntityAtom(byte[] source,
                         int start,
                         int len)
Build an instance of FontEntityAtom from on-disk data


FontEntityAtom

protected FontEntityAtom()
Create a new instance of FontEntityAtom

Method Detail

getRecordType

public long getRecordType()
Description copied from class: Record
Returns the type (held as a little endian in bytes 3 and 4) that this class handles

Specified by:
getRecordType in class Record

getFontName

public java.lang.String getFontName()
A null-terminated string that specifies the typeface name of the font. The length of this string must not exceed 32 characters including the null terminator.

Returns:
font name

setFontName

public void setFontName(java.lang.String name)
Set the name of the font. The length of this string must not exceed 32 characters including the null terminator. Will be converted to null-terminated if not already

Parameters:
name - of the font

setFontIndex

protected void setFontIndex(int idx)

getFontIndex

protected int getFontIndex()

writeOut

public void writeOut(java.io.OutputStream out)
              throws java.io.IOException
Write the contents of the record back, so it can be written to disk

Specified by:
writeOut in class Record
Throws:
java.io.IOException


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.