Gửi ý kiến phản hồi
Enum FontFamily
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
FontFamily
Không dùng nữa. Các phương thức getFontFamily()
và setFontFamily(String)
hiện sử dụng chuỗi
tên cho phông chữ thay vì enum này. Mặc dù enum này không được dùng nữa, nó vẫn sẽ giữ nguyên
có sẵn để tương thích với các tập lệnh cũ hơn.
Bảng liệt kê các phông chữ được hỗ trợ.
Sử dụng bản liệt kê FontFamily
để đặt phông chữ cho một dải văn bản, phần tử hoặc
tài liệu.
var 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 .
var text = 'Apps Script' ;
var a = body . getText () . indexOf ( text );
var b = a + text . length - 1 ;
body . editAsText () . setFontFamily ( a , b , DocumentApp . FontFamily . COMIC_SANS_MS );
Các thuộc tính không dùng nữa
Thuộc tính Loại Mô tả
AMARANTH
Enum
Bộ phông chữ Amaranth.
ARIAL
Enum
Bộ phông chữ WebP.
ARIAL_BLACK
Enum
Bộ phông chữ Phông chữ đen trắng.
ARIAL_NARROW
Enum
Bộ phông chữ Phông chữ Thu hẹp tục tĩu.
ARVO
Enum
Bộ phông chữ Arvo.
CALIBRI
Enum
Bộ phông chữ Calibri.
CAMBRIA
Enum
Bộ phông chữ Cambria.
COMIC_SANS_MS
Enum
Bộ phông chữ Comic Sans MS.
CONSOLAS
Enum
Bộ phông chữ Consolas.
CORSIVA
Enum
Bộ phông chữ Corsiva.
COURIER_NEW
Enum
Bộ phông chữ Courier New.
DANCING_SCRIPT
Enum
Bộ phông chữ Dancing Script.
DROID_SANS
Enum
Bộ phông chữ Droid Sans.
DROID_SERIF
Enum
Bộ phông chữ Droid Serif.
GARAMOND
Enum
Bộ phông chữ Garamond.
GEORGIA
Enum
Bộ phông chữ Georgia.
GLORIA_HALLELUJAH
Enum
Bộ phông chữ Gloria Hallelujah.
GREAT_VIBES
Enum
Bộ phông chữ Great Vibes.
LOBSTER
Enum
Bộ phông chữ Tôm hùm.
MERRIWEATHER
Enum
Bộ phông chữ MerriWeather.
PACIFICO
Enum
Bộ phông chữ Pacifico.
PHILOSOPHER
Enum
Bộ phông chữ Philosopher.
POIRET_ONE
Enum
Bộ phông chữ Poiret One
QUATTROCENTO
Enum
Bộ phông chữ Quattrocento.
ROBOTO
Enum
Bộ phông chữ Roboto
SHADOWS_INTO_LIGHT
Enum
Bộ phông chữ Shadows Into Light.
SYNCOPATE
Enum
Bộ phông chữ Syncopate.
TAHOMA
Enum
Bộ phông chữ Tahoma.
TIMES_NEW_ROMAN
Enum
Bộ phông chữ Times New Roman.
TREBUCHET_MS
Enum
Bộ phông chữ Trebuchet MS.
UBUNTU
Enum
Bộ phông chữ Ubuntu.
VERDANA
Enum
Bộ phông chữ Verdana.
Gửi ý kiến phản hồi
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0 . Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers . Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-08-22 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Thiếu thông tin tôi cần"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Quá phức tạp/quá nhiều bước"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Đã lỗi thời"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Vấn đề về bản dịch"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Vấn đề về mẫu/mã"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Khác"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Dễ hiểu"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Giúp tôi giải quyết được vấn đề"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Khác"
}]
Bạn muốn chia sẻ thêm với chúng tôi?
{"lastModified": "C\u1eadp nh\u1eadt l\u1ea7n g\u1ea7n \u0111\u00e2y nh\u1ea5t: 2024-08-22 UTC."}
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-08-22 UTC."]]