1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. pragma Ada_2005; 
  25.  
  26. pragma Warnings (Off, "*is already use-visible*"); 
  27. with Glib;            use Glib; 
  28. with Glib.Object;     use Glib.Object; 
  29. with Pango.Font_Face; use Pango.Font_Face; 
  30.  
  31. package Pango.Font_Family is 
  32.  
  33.    type Pango_Font_Family_Record is new GObject_Record with null record; 
  34.    type Pango_Font_Family is access all Pango_Font_Family_Record'Class; 
  35.  
  36.    type Pango_Font_Family_Array is array (Natural range <>) of Pango_Font_Family; 
  37.  
  38.    ------------------ 
  39.    -- Constructors -- 
  40.    ------------------ 
  41.  
  42.    function Get_Type return Glib.GType; 
  43.    pragma Import (C, Get_Type, "pango_font_family_get_type"); 
  44.  
  45.    ------------- 
  46.    -- Methods -- 
  47.    ------------- 
  48.  
  49.    function Get_Name 
  50.       (Self : not null access Pango_Font_Family_Record) return UTF8_String; 
  51.    --  Gets the name of the family. The name is unique among all fonts for the 
  52.    --  font backend and can be used in a Pango.Font.Pango_Font_Description to 
  53.    --  specify that a face from this family is desired. 
  54.  
  55.    function Is_Monospace 
  56.       (Self : not null access Pango_Font_Family_Record) return Boolean; 
  57.    --  A monospace font is a font designed for text display where the the 
  58.    --  characters form a regular grid. For Western languages this would mean 
  59.    --  that the advance width of all characters are the same, but this 
  60.    --  categorization also includes Asian fonts which include double-width 
  61.    --  characters: characters that occupy two grid cells. g_unichar_iswide 
  62.    --  returns a result that indicates whether a character is typically 
  63.    --  double-width in a monospace font. 
  64.    --  The best way to find out the grid-cell size is to call 
  65.    --  Pango.Font_Metrics.Get_Approximate_Digit_Width, since the results of 
  66.    --  Pango.Font_Metrics.Get_Approximate_Char_Width may be affected by 
  67.    --  double-width characters. 
  68.    --  Since: gtk+ 1.4 
  69.  
  70.    function List_Faces 
  71.       (Self : not null access Pango_Font_Family_Record) 
  72.        return Pango_Font_Face_Array; 
  73.    --  Lists the different font faces that make up Family. The faces in a 
  74.    --  family share a common design, but differ in slant, weight, width and 
  75.    --  other aspects. 
  76.  
  77. end Pango.Font_Family;