1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0023415: OSD_FontMgr can't idenify aspect for fonts with names dependant on system locale.

Added function DetectFontsAspects to Font_FontMgr class. This function uses workaround from OpenGl_FontMgr with FreeType for detecting font aspect.
Removed font name parsing from Font_FontMgr::InitFontDataBase(). Now the font name and font style we get through the FreeType.
Fixed Unix part of Font_FontMgr::InitFontDataBase() method. Font name and font style now detected through the FreeType.
Remarks fix. Added recursive default font directories scanning .
Fixed adding fonts folders recursively from configuration files.
Moved fonts aliases map from OpenGl_Display_1 to Font_FontMgr.
Moved fonts name definition from Graphic3d_NameOfFont.hxx to Font_NameOfFont.hxx.
Added new methods to Font_FontMgr: GetAvailableFontsNames, GetFont and FindFont.
Modified Font_SystemFont creation from XLFD. Added method IsEqual to Font_SystemFont.
Modified methods OpenGl_Display::FindFont, OpenGl_FontMgr::request_font in accordance to the new functionality of the Font_FontMgr.
OpenGl_FontMgr now stores only generated fonts instead of duplication of available fonts list.
Removed method OpenGl_FontMgr::requestFontList. Its function now performs Font_FontMgr::GetAvailableFontsNames.
Documentation was fixed
Adjusting testing cases for current state of OCCT
This commit is contained in:
dbv
2012-12-07 13:42:37 +04:00
parent cb9292ed80
commit aff395a36d
29 changed files with 809 additions and 840 deletions

View File

@@ -36,7 +36,7 @@
#include <TCollection_AsciiString.hxx>
#include <TColStd_SequenceOfExtendedString.hxx>
#include <Graphic3d_NameOfFont.hxx>
#include <Font_NameOfFont.hxx>
V3d_ColorScale::V3d_ColorScale( const Handle(V3d_LayerMgr)& aMgr )
: Aspect_ColorScale(),
@@ -99,7 +99,7 @@ void V3d_ColorScale::PaintText( const TCollection_ExtendedString& aText,
return;
theLayer->SetColor( aColor );
theLayer->SetTextAttributes( Graphic3d_NOF_ASCII_MONO, Aspect_TODT_NORMAL, aColor );
theLayer->SetTextAttributes( Font_NOF_ASCII_MONO, Aspect_TODT_NORMAL, aColor );
TCollection_AsciiString theText( aText.ToExtString(), '?' );
Standard_Integer aTextH = GetTextHeight();
Standard_Integer aWidth, anAscent, aDescent;

View File

@@ -23,7 +23,7 @@
#include <Aspect_Window.hxx>
#include <Visual3d_View.hxx>
#include <V3d_ColorScale.hxx>
#include <Graphic3d_NameOfFont.hxx>
#include <Font_NameOfFont.hxx>
V3d_LayerMgr::V3d_LayerMgr( const Handle(V3d_View)& AView )
@@ -98,7 +98,7 @@ Standard_Boolean V3d_LayerMgr::Begin()
myOverlay->Clear();
myOverlay->SetViewport( aW, aH ); //szv:!!!
myOverlay->Begin();
myOverlay->SetTextAttributes( Graphic3d_NOF_ASCII_MONO, Aspect_TODT_NORMAL, Quantity_Color() );
myOverlay->SetTextAttributes( Font_NOF_ASCII_MONO, Aspect_TODT_NORMAL, Quantity_Color() );
myOverlay->SetOrtho( 0, Max( aW, aH ), Max( aW, aH ), 0, Aspect_TOC_TOP_LEFT );
return Standard_True;