View Issue Details

IDProjectCategoryView StatusLast Update
0024386Open CASCADEOCCT:Visualizationpublic2013-12-19 13:59
ReporteraplAssigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
PlatformAOSL 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024386: Provide high-level API to specify font by user-defined path for AIS (Prs3d) aspects
DescriptionPresently, there is no obvious way to use user-defined fonts with AIS presentations. The Prs3d_TextAspect allows only system fonts to be specified for text primitives.

This option would be also useful for ensuring that test cases related to text rendering would use the same fonts on different platforms.
Additional information
and documentation updates
Added new method Font_FontMgr::RegisterFont() to register custom fonts.
Added new command vfont to access OCCT font manager.

# register more fonts
vfont add c:/Windows/Fonts/DejaVuSerifCondensed.ttf        fnt1
vfont add c:/Windows/Fonts/DejaVuSerifCondensed-Italic.ttf fnt2
# print all available fonts
vfont
# search for specific font
vfont find times-roman italic
# texture-based font rendering
vdrawtext "My Font1!" 0 0  0 255 0 0 0 0 0 0 22 0 fnt1
vdrawtext "My Font2!" 0 20 0 255 0 0 0 0 0 0 22 0 fnt2
# BRep font rendering
text2brep t "My Font1!" fnt1 22
text2brep t "My Font2!" fnt2 22

TagsNo tags attached.
Test case numberbugs vis bug24386

Attached Files

  • DejaVuSerif.ttf (367,260 bytes)
  • DejaVuSerif-Italic.ttf (343,388 bytes)
  • DejaVuSerifCondensed.ttf (334,040 bytes)
  • DejaVuSerifCondensed-Italic.ttf (342,736 bytes)

Relationships

related to 0024387 closedski Open CASCADE Tests - use system-independent fonts in test cases 

Activities

kgv

2013-11-20 13:45

developer   ~0026798

Patch is ready for review in CR24386 branch.

apl

2013-11-20 14:04

developer   ~0026803

Dear Bugmaster,

The branch is reviewed without remarks.

Please test.

apl

2013-11-20 16:28

developer  

DejaVuSerif.ttf (367,260 bytes)

apl

2013-11-20 16:29

developer  

DejaVuSerif-Italic.ttf (343,388 bytes)

apl

2013-11-20 16:29

developer  

DejaVuSerifCondensed.ttf (334,040 bytes)

apl

2013-11-20 16:29

developer  

DejaVuSerifCondensed-Italic.ttf (342,736 bytes)

apn

2013-11-21 13:20

administrator   ~0026821

Dear BugMaster,

Branch CR24386 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 570a791e70a147a3a836e8900464c8ed9b8dff7c

Number of compiler warnings:

occt component :
Linux: 317 (317 on master)
Windows: 0 (0 on master)

products component :
Linux: 189 (189 on master)
Windows: 286 (286 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
bugs vis bug24386 - OK

Testing on Linux:
Total MEMORY difference: 356989516 / 357237192
Total CPU difference: 44827.920000000384 / 43278.760000000184

Testing on Windows:
Total MEMORY difference: 412343444 / 411604936
Total CPU difference: 32759.78125 / 34417.765625

There are not differences in images found by testdiff.

Related Changesets

occt: master 725ef85e

2013-11-20 09:40:36

kgv


Committer: bugmaster Details Diff
0024386: Provide high-level API to specify font by user-defined path for AIS (Prs3d) aspects

Add new command vfont to access font manager.
Affected Issues
0024386
mod - src/Font/Font_FontMgr.cdl Diff File
mod - src/Font/Font_FontMgr.cxx Diff File
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2013-11-20 12:39 apl New Issue
2013-11-20 12:39 apl Assigned To => san
2013-11-20 12:44 apl Description Updated
2013-11-20 13:31 kgv Assigned To san => kgv
2013-11-20 13:31 kgv Status new => assigned
2013-11-20 13:45 kgv Note Added: 0026798
2013-11-20 13:45 kgv Assigned To kgv => apl
2013-11-20 13:45 kgv Status assigned => resolved
2013-11-20 13:45 kgv Additional Information Updated
2013-11-20 14:04 apl Note Added: 0026803
2013-11-20 14:04 apl Assigned To apl => bugmaster
2013-11-20 14:04 apl Status resolved => reviewed
2013-11-20 14:15 apl Relationship added related to 0024387
2013-11-20 14:27 mkv Assigned To bugmaster => mkv
2013-11-20 16:28 apl File Added: DejaVuSerif.ttf
2013-11-20 16:29 apl File Added: DejaVuSerif-Italic.ttf
2013-11-20 16:29 apl File Added: DejaVuSerifCondensed.ttf
2013-11-20 16:29 apl File Added: DejaVuSerifCondensed-Italic.ttf
2013-11-21 13:20 apn Note Added: 0026821
2013-11-21 13:20 apn Test case number => bugs vis bug24386
2013-11-21 13:20 apn Assigned To mkv => bugmaster
2013-11-21 13:20 apn Status reviewed => tested
2013-11-25 13:17 bugmaster Changeset attached => occt master 725ef85e
2013-11-25 13:17 bugmaster Status tested => verified
2013-11-25 13:17 bugmaster Resolution open => fixed
2013-12-19 13:50 bugmaster Status verified => closed
2013-12-19 13:59 bugmaster Fixed in Version => 6.7.0