MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030782Open CASCADE[OCCT] OCCT:Visualizationpublic2019-06-17 08:002019-09-05 14:12
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityfeature 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0Fixed in Version 
Summary0030782: Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets
DescriptionCommon fonts usually cover only Western subset of Unicode symbols, while characters for Chinese, Korean, Japanese languages are provided by dedicated font families (in turn, not supporting Western languages well).

In most cases, systems/applications implicitly load fallback fonts, when requested font does not support such symbols. This looks confusing (user has been fooled about font selection), but makes symbols readable.

It is suggested implementing the similar approach within Font_FTFont for a limited subset of known font families, enabled by default.
Steps To Reproduce
pload MODELING VISUALIZATION

dtracelevel trace
vfont -verbose 1
vclear
vinit View1
vaxo
vpoint p0 0 0 0

pload MODELING VISUALIZATION
dtracelevel trace
vfont -verbose 1
vclear
vinit View1
vtop
vpoint p00  0  0 0
vpoint p01  0 10 0
vpoint p11 10 10 0
vpoint p10 10  0 0
vfit
vzoom 0.8
vdrawtext t0 "한국어 (Korean) Čeština" -pos  0  0 0 -halign left  -font korean
vdrawtext t1 "한국어 (Korean) Čeština" -pos 10  1 0 -halign right -font sans
vdrawtext t2 "简体中文 (Chinese)"    -pos  0  2 0 -halign left  -font cjk
vdrawtext t3 "简体中文 (Chinese)"    -pos 10  3 0 -halign right -font sans
vdrawtext t4 "あ (Japanese)"         -pos  0  4 0 -halign left  -font cjk
vdrawtext t5 "あ (Japanese)"         -pos 10  5 0 -halign right -font sans
TagsNo tags attached.
Test case numberNot required
Attached Filespng file icon fonts_KO.png (8,707 bytes) 2019-06-17 08:31
png file icon fonts_OK.png (9,917 bytes) 2019-06-17 08:33

- Relationships
related to 0030439verifiedbugmaster Visualization - extend fonts search within Font_FontMgr::FindFont() on Linux 
related to 0030946verifiedabv Visualization - Image_AlienPixMap ignores 1-bit pixelformat when using FreeImage 

-  Notes
(0085077)
git (administrator)
2019-06-17 08:07

Branch CR30782 has been created by kgv.

SHA-1: c4093fcfeaf05d244abe59baab849d3b0c3cb0c8


Detailed log of new commits:

Author: kgv
Date: Sun Jun 16 13:09:49 2019 +0300

    0030782: Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets
    
    Font_FTFont now uses fallback fonts for characters from unsupported Unicode subsets,
    managed by Font_FTFont::ToUseUnicodeSubsetFallback()
    and Font_FontMgr::ToUseUnicodeSubsetFallback() option, enabled by default.
    The fallback list includes common font families for Chinese, Korean and Japanese languages.
    
    Font_FTFont::RenderGlyph() now supports FT_PIXEL_MODE_MONO input format used by some CJK fonts.
    OpenGl_Font::createTexture() now limits single texture size to circa 4096 glyphs.
    
    test/testgrid now expects test scripts being in UTF-8 encoding in sync with "DRAWEXE -f script.tcl".
(0085079)
git (administrator)
2019-06-17 08:35

Branch CR30782 has been updated forcibly by kgv.

SHA-1: 45a549b8519128e227a2da8e7d47f1e2b2fb71f0
(0085083)
kgv (developer)
2019-06-17 10:49

Patch is ready for review.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR30782-master-KGV [^]
(0085084)
git (administrator)
2019-06-17 10:52

Branch CR30782 has been updated forcibly by kgv.

SHA-1: 8fb843f1065a67982ca1cfa01df00117556b1116
(0085091)
git (administrator)
2019-06-17 14:35

Branch CR30782 has been updated forcibly by kgv.

SHA-1: 3759d86d1e45d3b303077fea6a343b18a31a7572
(0085099)
git (administrator)
2019-06-17 19:28

Branch CR30782 has been updated by kgv.

SHA-1: 9980621e365439d4a3e2eb229cfb074a98ee7b0a


Detailed log of new commits:

Author: kgv
Date: Mon Jun 17 19:28:03 2019 +0300

    AIS::InitFaceLength() - fixed usage of uninitialized result.

(0085103)
git (administrator)
2019-06-17 22:53

Branch CR30782 has been updated forcibly by kgv.

SHA-1: 534c822e324a2e86aaf60156576166145a53acea
(0085120)
osa (developer)
2019-06-18 15:55

Reviewed without remarks
(0085144)
bugmaster (administrator)
2019-06-19 19:41

Combination -
OCCT branch : CR30782
master SHA - 9980621e365439d4a3e2eb229cfb074a98ee7b0a
d67d4b811012eef8913d3c535c29654d0acf3c4c
Products branch : master SHA - c08b242c9da615bfdf83ca463321740d4cc22898
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16222.920000000222 / 16165.540000000055 [+0.35%]
Products
Total CPU difference: 10477.300000000025 / 10470.440000000042 [+0.07%]
Windows-64-VC14:
OCCT
Total CPU difference: 17643.40625 / 17617.546875 [+0.15%]
Products
Total CPU difference: 12080.15625 / 12111.125 [-0.26%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0085221)
git (administrator)
2019-06-22 16:22

Branch CR30782 has been deleted by inv.

SHA-1: 534c822e324a2e86aaf60156576166145a53acea

- Related Changesets
occt: master 912761ea
Timestamp: 2019-06-16 10:09:49
Author: kgv
Committer: bugmaster
Details ] Diff ]
0030782: Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets

Font_FTFont now uses fallback fonts for characters from unsupported Unicode subsets,
managed by Font_FTFont::ToUseUnicodeSubsetFallback()
and Font_FontMgr::ToUseUnicodeSubsetFallback() option, enabled by default.
The fallback list includes common font families for Chinese, Korean and Japanese languages.

Font_FTFont::RenderGlyph() now supports FT_PIXEL_MODE_MONO input format used by some CJK fonts.
OpenGl_Font::createTexture() now limits single texture size to circa 4096 glyphs.

test/testgrid now expects test scripts being in UTF-8 encoding in sync with "DRAWEXE -f script.tcl".

AIS::InitFaceLength() - fixed usage of uninitialized result.
mod - src/AIS/AIS.cxx Diff ] File ]
mod - src/DrawResources/TestCommands.tcl Diff ] File ]
mod - src/Font/FILES Diff ] File ]
mod - src/Font/Font_BRepFont.cxx Diff ] File ]
mod - src/Font/Font_FontMgr.cxx Diff ] File ]
mod - src/Font/Font_FontMgr.hxx Diff ] File ]
mod - src/Font/Font_FTFont.cxx Diff ] File ]
mod - src/Font/Font_FTFont.hxx Diff ] File ]
mod - src/Font/Font_NameOfFont.hxx Diff ] File ]
add - src/Font/Font_UnicodeSubset.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Font.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Font.hxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff ] File ]
add - tests/3rdparty/fonts/C2 Diff ] File ]

- Issue History
Date Modified Username Field Change
2019-06-17 08:00 kgv New Issue
2019-06-17 08:00 kgv Assigned To => kgv
2019-06-17 08:01 kgv Summary Visualization, Font_FTFont - try using predefined fallback fonts for extended Unicode subsets => Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets
2019-06-17 08:07 git Note Added: 0085077
2019-06-17 08:29 kgv Steps to Reproduce Updated View Revisions
2019-06-17 08:31 kgv File Added: fonts_KO.png
2019-06-17 08:33 kgv File Added: fonts_OK.png
2019-06-17 08:35 git Note Added: 0085079
2019-06-17 10:49 kgv Note Added: 0085083
2019-06-17 10:49 kgv Assigned To kgv => san
2019-06-17 10:49 kgv Status new => resolved
2019-06-17 10:52 git Note Added: 0085084
2019-06-17 14:35 git Note Added: 0085091
2019-06-17 14:46 kgv Relationship added related to 0030439
2019-06-17 19:28 git Note Added: 0085099
2019-06-17 22:53 git Note Added: 0085103
2019-06-18 13:47 kgv Assigned To san => osa
2019-06-18 15:55 osa Note Added: 0085120
2019-06-18 15:55 osa Assigned To osa => bugmaster
2019-06-18 15:55 osa Status resolved => reviewed
2019-06-19 19:40 bugmaster Test case number => Not required
2019-06-19 19:41 bugmaster Note Added: 0085144
2019-06-19 19:41 bugmaster Status reviewed => tested
2019-06-22 16:18 bugmaster Changeset attached => occt master 912761ea
2019-06-22 16:18 bugmaster Status tested => verified
2019-06-22 16:18 bugmaster Resolution open => fixed
2019-06-22 16:22 git Note Added: 0085221
2019-09-05 14:12 kgv Relationship added related to 0030946


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker