הוצא משימוש. השיטות get
ו-set
משתמשות עכשיו בשמות של גופנים כמחרוזות במקום ב-enum הזה. למרות שה-enum הזה הוצא משימוש, הוא יישאר זמין לצורך תאימות עם סקריפטים ישנים.
ספירה של הגופנים הנתמכים.
משתמשים בספירה Font
כדי להגדיר את הגופן לטווח של טקסט, רכיב או מסמך.
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);
נכסים שהוצאו משימוש
נכס | סוג | תיאור |
---|---|---|
AMARANTH | Enum | משפחת הגופנים Amaranth. |
ARIAL | Enum | משפחת הגופנים Arial. |
ARIAL_BLACK | Enum | משפחת הגופנים Arial Black. |
ARIAL_NARROW | Enum | משפחת הגופנים Arial Narrow. |
ARVO | Enum | משפחת הגופנים Arvo. |
CALIBRI | Enum | משפחת הגופנים Calibri. |
CAMBRIA | Enum | משפחת הגופנים Cambria. |
COMIC_SANS_MS | Enum | משפחת הגופנים Comic Sans MS. |
CONSOLAS | Enum | משפחת הגופנים Consolas. |
CORSIVA | Enum | משפחת הגופנים Corsiva. |
COURIER_NEW | Enum | משפחת הגופנים Courier New. |
DANCING_SCRIPT | Enum | משפחת הגופנים Dancing Script. |
DROID_SANS | Enum | משפחת הגופנים Droid Sans. |
DROID_SERIF | Enum | משפחת הגופנים Droid Serif. |
GARAMOND | Enum | משפחת הגופנים Garamond. |
GEORGIA | Enum | משפחת הגופנים Georgia. |
GLORIA_HALLELUJAH | Enum | משפחת הגופנים Gloria Hallelujah. |
GREAT_VIBES | Enum | משפחת הגופנים Great Vibes. |
LOBSTER | Enum | משפחת הגופנים Lobster. |
MERRIWEATHER | Enum | משפחת הגופנים Merriweather. |
PACIFICO | Enum | משפחת הגופנים Pacifico. |
PHILOSOPHER | Enum | משפחת הגופנים Philosopher. |
POIRET_ONE | Enum | משפחת הגופנים Poiret One |
QUATTROCENTO | Enum | משפחת הגופנים Quattrocento. |
ROBOTO | Enum | משפחת הגופנים Roboto |
SHADOWS_INTO_LIGHT | Enum | משפחת הגופנים Shadows Into Light. |
SYNCOPATE | Enum | משפחת הגופנים Syncopate. |
TAHOMA | Enum | משפחת הגופנים Tahoma. |
TIMES_NEW_ROMAN | Enum | משפחת הגופנים Times New Roman. |
TREBUCHET_MS | Enum | משפחת הגופנים Trebuchet MS. |
UBUNTU | Enum | משפחת הגופנים של Ubuntu. |
VERDANA | Enum | משפחת הגופנים Verdana. |