अब काम नहीं करता. get
और set
तरीके अब इस एनम के बजाय, फ़ॉन्ट के लिए स्ट्रिंग के नाम का इस्तेमाल करते हैं. हालांकि, यह एनम अब काम नहीं करता, लेकिन यह पुरानी स्क्रिप्ट के साथ काम करने के लिए उपलब्ध रहेगा.
इस्तेमाल किए जा सकने वाले फ़ॉन्ट की सूची.
टेक्स्ट, एलिमेंट या दस्तावेज़ की रेंज के लिए फ़ॉन्ट सेट करने के लिए, 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 फ़ॉन्ट फ़ैमिली. |