FontFile
Inheritance: java.lang.Object, com.aspose.threed.A3DObject
public abstract class FontFile extends A3DObject
Le fichier de police contient des définitions de glyphes, ceci est utilisé pour créer le profil de texte. Exemple: Le code suivant montre comment créer un maillage 3D à partir de texte en utilisant le fichier de police spécifié.
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");
Constructeurs
| Constructeur | Description |
|---|---|
| FontFile() |
Méthodes
| Méthode | Description |
|---|---|
| equals(Object arg0) | |
| findProperty(String propertyName) | Trouve la propriété. |
| fromFile(String fileName) | Charger FontFile à partir du nom de fichier |
| getClass() | |
| getName() | Obtient le nom. |
| getProperties() | Obtient la collection de toutes les propriétés. |
| getProperty(String property) | Obtenir la valeur de la propriété spécifiée |
| hashCode() | |
| notify() | |
| notifyAll() | |
| parse(byte[] bytes) | Analyser FontFile à partir des octets |
| removeProperty(Property property) | Supprime une propriété dynamique. |
| removeProperty(String property) | Supprime la propriété spécifiée identifiée par son nom |
| setName(String value) | Définit le nom. |
| setProperty(String property, Object value) | Définit la valeur de la propriété spécifiée |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
FontFile()
public FontFile()
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
findProperty(String propertyName)
public Property findProperty(String propertyName)
Trouve la propriété. Elle peut être une propriété dynamique (Créée par CreateDynamicProperty/SetProperty) ou une propriété native (Identifiée par son nom)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| propertyName | java.lang.String | Nom de la propriété. |
Returns: Property - The property.
fromFile(String fileName)
public static FontFile fromFile(String fileName)
Charger FontFile à partir du nom de fichier
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| fileName | java.lang.String | Chemin vers le fichier de police |
Returns: FontFile - FontFile instance
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getName()
public String getName()
Obtient le nom.
Returns: java.lang.String - le nom.
getProperties()
public PropertyCollection getProperties()
Obtient la collection de toutes les propriétés.
Returns: PropertyCollection - the collection of all properties.
getProperty(String property)
public Object getProperty(String property)
Obtenir la valeur de la propriété spécifiée
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| propriété | java.lang.String | Nom de la propriété |
Returns: java.lang.Object - La valeur de la propriété trouvée
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)
Analyser FontFile à partir des octets
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| bytes | byte[] | Contenu brut du fichier de police OTF |
Returns: FontFile - FontFile instance
removeProperty(Property property)
public boolean removeProperty(Property property)
Supprime une propriété dynamique.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| property | Property | Quelle propriété supprimer |
Returns: boolean - vrai si la propriété est supprimée avec succès
removeProperty(String property)
public boolean removeProperty(String property)
Supprime la propriété spécifiée identifiée par son nom
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| propriété | java.lang.String | Quelle propriété supprimer |
Returns: boolean - vrai si la propriété est supprimée avec succès
setName(String value)
public void setName(String value)
Définit le nom.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| valeur | java.lang.String | Nouvelle valeur |
setProperty(String property, Object value)
public void setProperty(String property, Object value)
Définit la valeur de la propriété spécifiée
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| propriété | java.lang.String | Nom de la propriété |
| valeur | java.lang.Object | La valeur de la propriété |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |