1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-06-15 11:44:07 +03:00
occt/src/Font/Font_FontAspect.hxx
kgv 5b377041e3 0030439: Visualization - extend fonts search within Font_FontMgr::FindFont() on Linux
Font_FontMgr has been redesigned to:
- Store fonts in a map instead a list.
- Allow mapping multiple fonts to a single alias.
- Log informative message about usage of non-requested font (fallback).
- Register all font files within standard folders on Linux when "fonts.dir" is not found.
- Prefer specific alias ("serif") as default fallback font instead of arbitrary one in a system.

A couple of obsolete and broken font aliases have been removed;
instead, new aliases of fonts popular on Linux platform have been added.

Font_NameOfFont.hxx has been extended with more neutral aliases
"monospace", "serif", "sans-serif", "cjk" and "korean".

Font_FontAspect enumeration values have been renamed Font_FA_ -> Font_FontAspect_
with old values preserved as alias.

Font_SystemFont has been extended with a list of paths to Font_FontAspect styles,
so that entire Font Family is now defined within a single Font_SystemFont instance.
Non-resizable fonts are now ignored by Font Manager.
2019-01-21 16:15:33 +03:00

37 lines
1.5 KiB
C++

// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Font_FontAspect_HeaderFile
#define _Font_FontAspect_HeaderFile
//! Specifies aspect of system font.
enum Font_FontAspect
{
Font_FontAspect_UNDEFINED = -1, //!< special value reserved for undefined aspect
Font_FontAspect_Regular = 0, //!< normal (regular) aspect
Font_FontAspect_Bold, //!< bold aspect
Font_FontAspect_Italic, //!< italic aspect
Font_FontAspect_BoldItalic, //!< bold+italic aspect
// old aliases
Font_FA_Undefined = Font_FontAspect_UNDEFINED,
Font_FA_Regular = Font_FontAspect_Regular,
Font_FA_Bold = Font_FontAspect_Bold,
Font_FA_Italic = Font_FontAspect_Italic,
Font_FA_BoldItalic = Font_FontAspect_BoldItalic
};
enum { Font_FontAspect_NB = Font_FontAspect_BoldItalic + 1 };
#endif // _Font_FontAspect_HeaderFile