.. wxPython Phoenix documentation

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

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

.. include:: headings.inc



.. _wx.FontMetrics:

==========================================================================================================================================
|phoenix_title|  **wx.FontMetrics**
==========================================================================================================================================

Simple collection of various font metrics. 
         

This object is returned by :meth:`wx.DC.GetFontMetrics <wx.ReadOnlyDC.GetFontMetrics>` . 









.. versionadded:: 2.9.2 
    







|

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

.. raw:: html

   <div class="collabsible-wrapper">
      <input id="collapsible-inheritance" class="collapsible-checkbox" type="checkbox">
      <label for="collapsible-inheritance" tabindex="0" title="Show inheritance diagram" class="collapsible-label">Inheritance diagram for class <strong>FontMetrics</strong>:</label>
      <div class="collapsible-content">
         <p class="graphviz">
            <center><img src="_static/images/inheritance/wx.FontMetrics_inheritance.svg" alt="Inheritance diagram of FontMetrics" usemap="#dummy" class="inheritance invert-in-dark-mode"/></center>
            <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.FontMetrics.html" title="Simple collection of various font metrics." alt="" coords="5,5,141,34"/> </map> 
         </p>
      </div>
   </div>
   <script type="text/javascript" src="_static/inheritancetoggle.js"></script>



|


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

================================================================================ ================================================================================
:meth:`~wx.FontMetrics.__init__`                                                 Constructor initializes all fields to 0.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.FontMetrics.ascent`                                                   A public C++ attribute of type ``int``. Part of the height above the baseline. 
                 
:attr:`~wx.FontMetrics.averageWidth`                                             A public C++ attribute of type ``int``. Average font width, a.k.a. "x-width". 
                 
:attr:`~wx.FontMetrics.descent`                                                  A public C++ attribute of type ``int``. Part of the height below the baseline. 
                 
:attr:`~wx.FontMetrics.externalLeading`                                          A public C++ attribute of type ``int``. Inter-line spacing. 
                 
:attr:`~wx.FontMetrics.height`                                                   A public C++ attribute of type ``int``. Total character height. 
                 
:attr:`~wx.FontMetrics.internalLeading`                                          A public C++ attribute of type ``int``. Intra-line spacing. 
                 
================================================================================ ================================================================================


|


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


.. class:: wx.FontMetrics(object)

   **Possible constructors**::

       FontMetrics() -> None
       
   
   Simple collection of various font metrics.



   .. method:: __init__(self)

      Constructor initializes all fields to 0. 
                 

      :rtype: `None`     








   .. attribute:: ascent

      A public C++ attribute of type ``int``. Part of the height above the baseline. 
                 


   .. attribute:: averageWidth

      A public C++ attribute of type ``int``. Average font width, a.k.a. "x-width". 
                 


   .. attribute:: descent

      A public C++ attribute of type ``int``. Part of the height below the baseline. 
                 


   .. attribute:: externalLeading

      A public C++ attribute of type ``int``. Inter-line spacing. 
                 


   .. attribute:: height

      A public C++ attribute of type ``int``. Total character height. 
                 


   .. attribute:: internalLeading

      A public C++ attribute of type ``int``. Intra-line spacing. 
                 

