.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.FontData:

==========================================================================================================================================
|phoenix_title|  **wx.FontData**
==========================================================================================================================================

This class holds a variety of information related to font dialogs.          







         



.. seealso:: :ref:`FontDialog Overview <fontdialog overview>`, :ref:`wx.Font`, :ref:`wx.FontDialog`    







|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>FontData</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.FontData_inheritance.png" alt="Inheritance diagram of FontData" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.FontData.html" title="wx.FontData" alt="" coords="5,83,109,112"/> <area shape="rect" id="node2" href="wx.Object.html" title="wx.Object" alt="" coords="14,5,101,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.FontData.__init__`                                                    Constructor.
:meth:`~wx.FontData.EnableEffects`                                               Enables or disables "effects" under Windows or generic only.
:meth:`~wx.FontData.GetAllowSymbols`                                             Under Windows, returns a flag determining whether symbol fonts can be selected.
:meth:`~wx.FontData.GetChosenFont`                                               Gets the font chosen by the user if the user pressed ``wx.OK`` (:meth:`wx.FontDialog.ShowModal`   returned ``wx.ID_OK``).
:meth:`~wx.FontData.GetColour`                                                   Gets the colour associated with the font dialog.
:meth:`~wx.FontData.GetEnableEffects`                                            Determines whether "effects" are enabled under Windows.
:meth:`~wx.FontData.GetInitialFont`                                              Gets the font that will be initially used by the font dialog.
:meth:`~wx.FontData.GetRestrictSelection`                                        Returns the state of the flags restricting the selection.
:meth:`~wx.FontData.GetShowHelp`                                                 Returns ``True`` if the Help button will be shown (Windows only).
:meth:`~wx.FontData.RestrictSelection`                                           Restricts the selection to a subset of the available fonts.
:meth:`~wx.FontData.SetAllowSymbols`                                             Under Windows, determines whether symbol fonts can be selected.
:meth:`~wx.FontData.SetChosenFont`                                               Sets the font that will be returned to the user (for internal use only).
:meth:`~wx.FontData.SetColour`                                                   Sets the colour that will be used for the font foreground colour.
:meth:`~wx.FontData.SetInitialFont`                                              Sets the font that will be initially used by the font dialog.
:meth:`~wx.FontData.SetRange`                                                    Sets the valid range for the font point size (Windows only).
:meth:`~wx.FontData.SetShowHelp`                                                 Determines whether the Help button will be displayed in the font dialog (Windows only).
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.FontData.AllowSymbols`                                                See :meth:`~wx.FontData.GetAllowSymbols` and :meth:`~wx.FontData.SetAllowSymbols`
:attr:`~wx.FontData.ChosenFont`                                                  See :meth:`~wx.FontData.GetChosenFont` and :meth:`~wx.FontData.SetChosenFont`
:attr:`~wx.FontData.Colour`                                                      See :meth:`~wx.FontData.GetColour` and :meth:`~wx.FontData.SetColour`
:attr:`~wx.FontData.InitialFont`                                                 See :meth:`~wx.FontData.GetInitialFont` and :meth:`~wx.FontData.SetInitialFont`
:attr:`~wx.FontData.ShowHelp`                                                    See :meth:`~wx.FontData.GetShowHelp` and :meth:`~wx.FontData.SetShowHelp`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.FontData(Object)

   **Possible constructors**::

       FontData()
       
   
   This class holds a variety of information related to font dialogs.



   .. method:: __init__(self)

      Constructor.                  

      Initializes `fontColour`  to black, `showHelp`  to ``False``, `allowSymbols`  to ``True``, `enableEffects`  to ``True``, `minSize`  to 0 and `maxSize`  to 0.                   





   .. method:: EnableEffects(self, enable)

      Enables or disables "effects" under Windows or generic only.                  

      This refers to the controls for manipulating colour, strikeout and underline properties. 

      The default value is ``True``.                  


      :param `enable`: 
      :type `enable`: bool







   .. method:: GetAllowSymbols(self)

      Under Windows, returns a flag determining whether symbol fonts can be selected.                  

      Has no effect on other platforms. 

      The default value is ``True``.                  

      :rtype: `bool`








   .. method:: GetChosenFont(self)

      Gets the font chosen by the user if the user pressed ``wx.OK`` (:meth:`wx.FontDialog.ShowModal`   returned ``wx.ID_OK``).                  

      :rtype: :ref:`wx.Font`








   .. method:: GetColour(self)

      Gets the colour associated with the font dialog.                  

      The default value is black.                  

      :rtype: :ref:`wx.Colour`








   .. method:: GetEnableEffects(self)

      Determines whether "effects" are enabled under Windows.                  

      This refers to the controls for manipulating colour, strikeout and underline properties. 

      The default value is ``True``.                  

      :rtype: `bool`








   .. method:: GetInitialFont(self)

      Gets the font that will be initially used by the font dialog.                  

      This should have previously been set by the application.                  

      :rtype: :ref:`wx.Font`








   .. method:: GetRestrictSelection(self)

      Returns the state of the flags restricting the selection.                  

      Note that currently these flags are only effectively used in wxMSW. 


      The default value is   ``FONTRESTRICT_NONE`` . 

                

      :rtype: `int`







      :returns: 

   

         -  ``FONTRESTRICT_NONE``   If no restriction applies, or a combination of the following flags: 
         -  ``FONTRESTRICT_SCALABLE``   To show only scalable fonts - no raster fonts. 
         -  ``FONTRESTRICT_FIXEDPITCH``   To show only monospaced fonts. 










      .. versionadded:: 4.1/wxWidgets-3.1.4  
     








   .. method:: GetShowHelp(self)

      Returns ``True`` if the Help button will be shown (Windows only).                  

      The default value is ``False``.                  

      :rtype: `bool`








   .. method:: RestrictSelection(self, flags)

      Restricts the selection to a subset of the available fonts.                  

      Note that currently these flags are only effectively used in wxMSW and are ignored in the other ports. 

      Possible values are: 



      -  ``FONTRESTRICT_NONE``   No restriction, show all fonts in the dialog. 
      -  ``FONTRESTRICT_SCALABLE``   To show only scalable fonts - no raster fonts. 
      -  ``FONTRESTRICT_FIXEDPITCH``   To show only monospaced fonts. 




      The default value is  ``FONTRESTRICT_NONE`` . 

                


      :param `flags`: 
      :type `flags`: int






      .. versionadded:: 4.1/wxWidgets-3.1.4  
     








   .. method:: SetAllowSymbols(self, allowSymbols)

      Under Windows, determines whether symbol fonts can be selected.                  

      Has no effect on other platforms. 

      The default value is ``True``.                  


      :param `allowSymbols`: 
      :type `allowSymbols`: bool







   .. method:: SetChosenFont(self, font)

      Sets the font that will be returned to the user (for internal use only).                  


      :param `font`: 
      :type `font`: wx.Font







   .. method:: SetColour(self, colour)

      Sets the colour that will be used for the font foreground colour.                  

      The default colour is black.                  


      :param `colour`: 
      :type `colour`: wx.Colour







   .. method:: SetInitialFont(self, font)

      Sets the font that will be initially used by the font dialog.                  


      :param `font`: 
      :type `font`: wx.Font







   .. method:: SetRange(self, min, max)

      Sets the valid range for the font point size (Windows only).                  

      The default is 0, 0 (unrestricted range).                  


      :param `min`: 
      :type `min`: int
      :param `max`: 
      :type `max`: int







   .. method:: SetShowHelp(self, showHelp)

      Determines whether the Help button will be displayed in the font dialog (Windows only).                  

      The default value is ``False``.                  


      :param `showHelp`: 
      :type `showHelp`: bool







   .. attribute:: AllowSymbols

      See :meth:`~wx.FontData.GetAllowSymbols` and :meth:`~wx.FontData.SetAllowSymbols`


   .. attribute:: ChosenFont

      See :meth:`~wx.FontData.GetChosenFont` and :meth:`~wx.FontData.SetChosenFont`


   .. attribute:: Colour

      See :meth:`~wx.FontData.GetColour` and :meth:`~wx.FontData.SetColour`


   .. attribute:: InitialFont

      See :meth:`~wx.FontData.GetInitialFont` and :meth:`~wx.FontData.SetInitialFont`


   .. attribute:: ShowHelp

      See :meth:`~wx.FontData.GetShowHelp` and :meth:`~wx.FontData.SetShowHelp`

