LCOV - code coverage report
Current view: top level - vcl/inc - PhysicalFontFamily.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 4 10 40.0 %
Date: 2015-06-13 12:38:46 Functions: 4 10 40.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_VCL_INC_PHYSICALFONTFAMILY_HXX
      21             : #define INCLUDED_VCL_INC_PHYSICALFONTFAMILY_HXX
      22             : 
      23             : #include <set>
      24             : 
      25             : #include <unotools/fontcfg.hxx>
      26             : 
      27             : #include "PhysicalFontFace.hxx"
      28             : 
      29             : class PhysicalFontFace;
      30             : class PhysicalFontCollection;
      31             : 
      32             : // flags for mnTypeFaces member
      33             : #define FONT_FAMILY_SCALABLE      (1<<0)
      34             : #define FONT_FAMILY_SYMBOL        (1<<1)
      35             : #define FONT_FAMILY_NONESYMBOL    (1<<2)
      36             : #define FONT_FAMILY_LIGHT         (1<<4)
      37             : #define FONT_FAMILY_BOLD          (1<<5)
      38             : #define FONT_FAMILY_NORMAL        (1<<6)
      39             : #define FONT_FAMILY_NONEITALIC    (1<<8)
      40             : #define FONT_FAMILY_ITALIC        (1<<9)
      41             : 
      42             : class PhysicalFontFamily
      43             : {
      44             : public:
      45             :                         PhysicalFontFamily( const OUString& rSearchName );
      46             :                        ~PhysicalFontFamily();
      47             : 
      48     2461397 :     const OUString&     GetFamilyName() const    { return maName; }
      49       13994 :     const OUString&     GetSearchName() const    { return maSearchName; }
      50           0 :     const OUString&     GetAliasNames() const    { return maMapNames; }
      51           0 :     const OUString&     GetMatchFamilyName() const { return maMatchFamilyName; }
      52           0 :     ImplFontAttrs       GetMatchType() const     { return mnMatchType ; }
      53           0 :     FontWeight          GetMatchWeight() const   { return meMatchWeight ; }
      54           0 :     FontWidth           GetMatchWidth() const    { return meMatchWidth ; }
      55         162 :     bool                IsScalable() const       { return mpFirst->IsScalable(); }
      56         270 :     int                 GetMinQuality() const    { return mnMinQuality; }
      57           0 :     int                 GetTypeFaces() const     { return mnTypeFaces; }
      58             :     bool                AddFontFace( PhysicalFontFace* );
      59             :     void                InitMatchData( const utl::FontSubstConfiguration&,
      60             :                                        const OUString& rSearchName );
      61             :     PhysicalFontFace*   FindBestFontFace( const FontSelectPattern& rFSD ) const;
      62             : 
      63             :     void                GetFontHeights( std::set<int>& rHeights ) const;
      64             :     void                UpdateDevFontList( ImplGetDevFontList& ) const;
      65             :     void                UpdateCloneFontList( PhysicalFontCollection&,
      66             :                                              bool bScalable, bool bEmbeddable ) const;
      67             : 
      68             : static void             CalcType( ImplFontAttrs& rType, FontWeight& rWeight, FontWidth& rWidth,
      69             :                                   FontFamily eFamily, const utl::FontNameAttr* pFontAttr );
      70             : 
      71             : private:
      72             :     PhysicalFontFace*   mpFirst;            // linked list of physical font faces
      73             :     OUString            maName;             // Fontname (original font family name)
      74             :     OUString            maSearchName;       // normalized font family name
      75             :     OUString            maMapNames;         // fontname aliases
      76             :     int                 mnTypeFaces;        // Typeface Flags
      77             :     ImplFontAttrs       mnMatchType;        // MATCH - Type
      78             :     OUString            maMatchFamilyName;  // MATCH - FamilyName
      79             :     FontWeight          meMatchWeight;      // MATCH - Weight
      80             :     FontWidth           meMatchWidth;       // MATCH - Width
      81             :     FontFamily          meFamily;
      82             :     FontPitch           mePitch;
      83             :     int                 mnMinQuality;       // quality of the worst font face
      84             : };
      85             : 
      86             : #endif // INCLUDED_VCL_INC_PHYSICALFONTFAMILY_HXX
      87             : 
      88             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11