1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0024181: Text to BRep functionality

Introduce new class Font_BRepFont for conversion of font glyph in vector format into BRep representation.
New text2brep Draw Harness command.

bottle.tcl - draw text on the bottle side using new functionality.
ViewerTest - process Delete key in 3D-Viewer to delete selected presentations.
Font_FontMgr::FindFont - return correct font when font alias and not default aspect is requested.

bottle.tcl - use prism instead of pipe

TKViewerTest - add required FreeType dependency

verase - display the list of erase objects

TKViewerTest - add required FreeType dependency for projects generation
This commit is contained in:
isn
2013-10-10 13:35:04 +04:00
committed by bugmaster
parent c63628e845
commit b514beda8a
22 changed files with 1248 additions and 177 deletions

View File

@@ -18,6 +18,9 @@
// and conditions governing the rights and limitations under the License.
#include <Font_FTFont.hxx>
#include <Font_FontMgr.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_HAsciiString.hxx>
IMPLEMENT_STANDARD_HANDLE (Font_FTFont, Standard_Transient)
IMPLEMENT_STANDARD_RTTIEXT(Font_FTFont, Standard_Transient)
@@ -64,7 +67,7 @@ void Font_FTFont::Release()
}
// =======================================================================
// function : Font_FTFont
// function : Init
// purpose :
// =======================================================================
bool Font_FTFont::Init (const NCollection_String& theFontPath,
@@ -102,6 +105,22 @@ bool Font_FTFont::Init (const NCollection_String& theFontPath,
return true;
}
// =======================================================================
// function : Init
// purpose :
// =======================================================================
bool Font_FTFont::Init (const NCollection_String& theFontName,
const Font_FontAspect theFontAspect,
const unsigned int thePointSize,
const unsigned int theResolution)
{
Handle(Font_FontMgr) aFontMgr = Font_FontMgr::GetInstance();
const Handle(TCollection_HAsciiString) aFontName = new TCollection_HAsciiString (theFontName.ToCString());
Handle(Font_SystemFont) aRequestedFont = aFontMgr->FindFont (aFontName, theFontAspect, thePointSize);
return !aRequestedFont.IsNull()
&& Font_FTFont::Init (aRequestedFont->FontPath()->ToCString(), thePointSize, theResolution);
}
// =======================================================================
// function : loadGlyph
// purpose :