]> OCCT Git - occt-copy.git/commit
0030439: Visualization - extend fonts search within Font_FontMgr::FindFont() on Linux
authorkgv <kgv@opencascade.com>
Thu, 10 Jan 2019 20:10:51 +0000 (23:10 +0300)
committerkgv <kgv@opencascade.com>
Thu, 21 Nov 2019 09:55:41 +0000 (12:55 +0300)
commitc0d4cf76fcef2c667bc836d07ea88755217dfb39
tree066dd1cb8b868d9036dfcd3268626c2c222a2eab
parent6f913122a4e907cad31f60954aab13ba24b0878c
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.
16 files changed:
src/Font/Font_FTFont.cxx
src/Font/Font_FontAspect.hxx
src/Font/Font_FontMgr.cxx
src/Font/Font_FontMgr.hxx
src/Font/Font_NameOfFont.hxx
src/Font/Font_SystemFont.cxx
src/Font/Font_SystemFont.hxx
src/OpenGl/OpenGl_Text.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
tests/3rdparty/fonts/A2
tests/3rdparty/fonts/A6
tests/3rdparty/fonts/A8
tests/3rdparty/fonts/B1
tests/3rdparty/fonts/B2
tests/bugs/vis/bug22149
tests/demo/draw/bug23745