Enum FontFamily
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
FontFamily
Veraltet. Bei den Methoden getFontFamily() und setFontFamily(String) wird jetzt ein String verwendet
Namen für Schriftarten anstelle
dieser Aufzählung. Obwohl diese Enum veraltet ist, bleibt sie erhalten.
für die Kompatibilität mit älteren Skripts verfügbar.
Eine Aufzählung der unterstützten Schriftarten.
Verwenden Sie die Aufzählung FontFamily, um die Schriftart für einen Textbereich, ein Element oder
Dokument.
const body =
DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody();
// Insert a paragraph at the start of the document.
body.insertParagraph(0, 'Hello, Apps Script!');
// Set the tab font to Calibri.
body.editAsText().setFontFamily(DocumentApp.FontFamily.CALIBRI);
// Set the first paragraph font to Arial.
body.getParagraphs()[0].setFontFamily(DocumentApp.FontFamily.ARIAL);
// Set "Apps Script" to Comic Sans MS.
const text = 'Apps Script';
const a = body.getText().indexOf(text);
const b = a + text.length - 1;
body.editAsText().setFontFamily(a, b, DocumentApp.FontFamily.COMIC_SANS_MS);
Verworfene Attribute
| Attribut | Typ | Beschreibung |
AMARANTH | Enum | Die Schriftfamilie Amaranth |
ARIAL | Enum | Die Schriftfamilie " Arial" |
ARIAL_BLACK | Enum | Die Schriftfamilie Arial Black. |
ARIAL_NARROW | Enum | Die schmale Schriftfamilie " Arial (schmal)". |
ARVO | Enum | Die Arvo-Schriftfamilie |
CALIBRI | Enum | Die Schriftfamilie Calibri |
CAMBRIA | Enum | Die Cambria-Schriftarten |
COMIC_SANS_MS | Enum | Die Comic Sans MS-Schriftfamilie |
CONSOLAS | Enum | Die Consolas-Schriftfamilie |
CORSIVA | Enum | Die Schriftfamilie Corsiva |
COURIER_NEW | Enum | Die Schriftfamilie Courier New |
DANCING_SCRIPT | Enum | Die Schriftfamilie Dancing Script |
DROID_SANS | Enum | Die Schriftfamilie Droid Sans |
DROID_SERIF | Enum | Die Schriftfamilie Droid Serif |
GARAMOND | Enum | Die Schriftfamilie von Garamond |
GEORGIA | Enum | Die Schriftfamilie Georgia |
GLORIA_HALLELUJAH | Enum | Die Schriftfamilie Gloria Halleluja |
GREAT_VIBES | Enum | Die Schriftfamilie Great Vibes |
LOBSTER | Enum | Die Schriftfamilie "Lobster" |
MERRIWEATHER | Enum | Die Schriftfamilie Merriweather |
PACIFICO | Enum | Die Pacifico-Schriftfamilie |
PHILOSOPHER | Enum | Die Schriftfamilie Philosopher |
POIRET_ONE | Enum | Die Schriftfamilie Poiret One |
QUATTROCENTO | Enum | Die Quattrocento-Schriftfamilie |
ROBOTO | Enum | Die Roboto-Schriftfamilie |
SHADOWS_INTO_LIGHT | Enum | Die Schriftfamilie Shadows Into Light. |
SYNCOPATE | Enum | Die Syncopate-Schriftfamilie. |
TAHOMA | Enum | Die Schriftfamilie Tahoma |
TIMES_NEW_ROMAN | Enum | Die Schriftfamilie Times New Roman |
TREBUCHET_MS | Enum | Die Schriftfamilie Trebuchet MS. |
UBUNTU | Enum | Die Ubuntu-Schriftarten |
VERDANA | Enum | Die Verdana-Schriftfamilie |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2026-04-13 (UTC).
[null,null,["Zuletzt aktualisiert: 2026-04-13 (UTC)."],[],["`FontFamily` enumeration, though deprecated, remains for older script compatibility. It lists supported font options like `ARIAL`, `CALIBRI`, and `COMIC_SANS_MS`. The methods `getFontFamily()` and `setFontFamily(String)` now use string names, and `FontFamily` is used to apply a specific font to document text, paragraphs, or specific ranges within text, via methods like `setFontFamily()`. There are multiple examples showing the usage of the font `FontFamily`.\n"]]