Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Enum FontFamily
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
FontFamily
非推奨。getFontFamily() メソッドと setFontFamily(String) メソッドで string が使用されるようになりました。
フォント名を設定します。この列挙型は非推奨ですが、今後も
古いスクリプトとの互換性があります。
サポートされているフォントの列挙。
FontFamily 列挙型を使用して、テキスト、要素、または
ドキュメントをご覧ください
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 フォント ファミリー。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2026-04-13 UTC。
[null,null,["最終更新日 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"]]