.. highlightlang:: us .. index:: Overview Fonts, Fonts .. _overview-fonts: Overview Fonts ============== Fonts contain attributes like font name, size, color etc. Fonts can be used for text objects, axes titles etc. .. us.example **Example** The following example sets the font for the diagram axes and titles to 12pt, "Times New Roman" in red. :: // Create sinus curve x = linspace(0,2*PI,100) y = sin(x) h = plot(x, y) // plot returns a vector with three elements. // The second element is the diagram handle. // Retrieve x axis font: hFont = LayerGetAxisTitleFont(h[2], "X"); // Set attributes: FontSetHeight(hFont, 12); FontSetFaceName(hFont, "Times New Roman"); FontSetColorRGB(hFont, [255,0,0]); // Set font LayerSetAxisTitleFont(h[2], "X", hFont); LayerSetAxisTitleFont(h[2], "Y", hFont); LayerSetAxisLabelFont(h[2], "X", hFont); LayerSetAxisLabelFont(h[2], "Y", hFont); // Destroy font // LayerGetAxisTitleFont returned a copy of a font. FontDestroy(hFont) .. us.indexlist CreateandDestroyFontCreateFontDialogFont,Create and Destroy,FontCreate,FontDialog,FontDestroy, .. include:: ../ftab/CreateandDestroyFontCreateFontDialogFont.ftab .. us.makeindex FontSet, Set Functions .. include:: ../ftab/FontSet.ftab .. us.makeindex FontGet, Get Functions .. include:: ../ftab/FontGet.ftab .. seealso:: :ref:`functions-by-categories` :sub:`id-186060`