FontFile
Inheritance: java.lang.Object, com.aspose.threed.A3DObject
public abstract class FontFile extends A3DObject
Il file di font contiene le definizioni dei glifi, questo è usato per creare il profilo di testo. Example: Il codice seguente mostra come creare una mesh 3D dal testo usando il file di font specificato.
var font = FontFile.fromFile("CascadiaCode-Regular.otf");
var text = new Text();
text.setFont(font);
text.setContent("ABC");
text.setFontSize(10);
var linear = new LinearExtrusion(text, 10).toMesh();
var scene = new Scene(linear);
scene.save("test.stl");
Costruttori
| Costruttore | Descrizione |
|---|---|
| FontFile() |
Metodi
| Metodo | Descrizione |
|---|---|
| equals(Object arg0) | |
| findProperty(String propertyName) | Trova la proprietà. |
| fromFile(String fileName) | Carica FontFile dal nome del file |
| getClass() | |
| getName() | Ottiene il nome. |
| getProperties() | Ottiene la collezione di tutte le proprietà. |
| getProperty(String property) | Ottieni il valore della proprietà specificata |
| hashCode() | |
| notify() | |
| notifyAll() | |
| parse(byte[] bytes) | Analizza FontFile da byte |
| removeProperty(Property property) | Rimuove una proprietà dinamica. |
| removeProperty(String property) | Rimuove la proprietà specificata identificata per nome |
| setName(String value) | Imposta il nome. |
| setProperty(String property, Object value) | Imposta il valore della proprietà specificata |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
FontFile()
public FontFile()
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
findProperty(String propertyName)
public Property findProperty(String propertyName)
Trova la proprietà. Può essere una proprietà dinamica (creata con CreateDynamicProperty/SetProperty) o una proprietà nativa (identificata per nome).
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| propertyName | java.lang.String | Nome della proprietà. |
Returns: Property - The property.
fromFile(String fileName)
public static FontFile fromFile(String fileName)
Carica FontFile dal nome del file
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| fileName | java.lang.String | Percorso del file di font |
Returns: FontFile - FontFile instance
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getName()
public String getName()
Ottiene il nome.
Returns: java.lang.String - il nome.
getProperties()
public PropertyCollection getProperties()
Ottiene la collezione di tutte le proprietà.
Returns: PropertyCollection - the collection of all properties.
getProperty(String property)
public Object getProperty(String property)
Ottieni il valore della proprietà specificata
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| proprietà | java.lang.String | Nome della proprietà |
Returns: java.lang.Object - Il valore della proprietà trovata
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
parse(byte[] bytes)
public static FontFile parse(byte[] bytes)
Analizza FontFile da byte
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| byte | byte[] | Contenuto grezzo del file di font OTF |
Returns: FontFile - FontFile instance
removeProperty(Property property)
public boolean removeProperty(Property property)
Rimuove una proprietà dinamica.
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| property | Property | Quale proprietà rimuovere |
Returns: boolean - true se la proprietà è stata rimossa con successo
removeProperty(String property)
public boolean removeProperty(String property)
Rimuove la proprietà specificata identificata per nome
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| proprietà | java.lang.String | Quale proprietà rimuovere |
Returns: boolean - true se la proprietà è stata rimossa con successo
setName(String value)
public void setName(String value)
Imposta il nome.
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| valore | java.lang.String | Nuovo valore |
setProperty(String property, Object value)
public void setProperty(String property, Object value)
Imposta il valore della proprietà specificata
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| proprietà | java.lang.String | Nome della proprietà |
| valore | java.lang.Object | Il valore della proprietà |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| arg0 | long | |
| arg1 | int |