MantisBT - Open CASCADE
View Issue Details
0030782Open CASCADE[OCCT] OCCT:Visualizationpublic2019-06-17 08:002020-08-31 13:01
kgv 
bugmaster 
normalfeature 
closedfixed 
 
[OCCT] 7.4.0[OCCT] 7.4.0 
Not required
0030782: Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets
Common 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.
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
No tags attached.
related to 0030439closed bugmaster Open CASCADE Visualization - extend fonts search within Font_FontMgr::FindFont() on Linux 
parent of 0031720closed bugmaster Community Visualization, Font_FontMgr - register one more CJK fallback font available on newer Android devices 
parent of 0031728closed bugmaster Community Visualization, Font_FontMgr - provide function to register fallback fonts in application level 
related to 0030946closed abv Open CASCADE Visualization - Image_AlienPixMap ignores 1-bit pixelformat when using FreeImage 
related to 0031719closed bugmaster Community no default Chinese Unicode support 
png fonts_KO.png (8,707) 2019-06-17 08:31
https://tracker.dev.opencascade.org/
png fonts_OK.png (9,917) 2019-06-17 08:33
https://tracker.dev.opencascade.org/
Issue History
2019-06-17 08:00kgvNew Issue
2019-06-17 08:00kgvAssigned To => kgv
2019-06-17 08:01kgvSummaryVisualization, 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:07gitNote Added: 0085077
2019-06-17 08:29kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21380#r21380
2019-06-17 08:31kgvFile Added: fonts_KO.png
2019-06-17 08:33kgvFile Added: fonts_OK.png
2019-06-17 08:35gitNote Added: 0085079
2019-06-17 10:49kgvNote Added: 0085083
2019-06-17 10:49kgvAssigned Tokgv => san
2019-06-17 10:49kgvStatusnew => resolved
2019-06-17 10:52gitNote Added: 0085084
2019-06-17 14:35gitNote Added: 0085091
2019-06-17 14:46kgvRelationship addedrelated to 0030439
2019-06-17 19:28gitNote Added: 0085099
2019-06-17 22:53gitNote Added: 0085103
2019-06-18 13:47kgvAssigned Tosan => osa
2019-06-18 15:55osaNote Added: 0085120
2019-06-18 15:55osaAssigned Toosa => bugmaster
2019-06-18 15:55osaStatusresolved => reviewed
2019-06-19 19:40bugmasterTest case number => Not required
2019-06-19 19:41bugmasterNote Added: 0085144
2019-06-19 19:41bugmasterStatusreviewed => tested
2019-06-22 16:18bugmasterChangeset attached => occt master 912761ea
2019-06-22 16:18bugmasterStatustested => verified
2019-06-22 16:18bugmasterResolutionopen => fixed
2019-06-22 16:22gitNote Added: 0085221
2019-09-05 14:12kgvRelationship addedrelated to 0030946
2020-08-19 19:01kgvRelationship addedrelated to 0031719
2020-08-21 14:14kgvRelationship addedparent of 0031720
2020-08-31 13:01kgvRelationship addedparent of 0031728

Notes
(0085077)
git   
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   
2019-06-17 08:35   
Branch CR30782 has been updated forcibly by kgv.

SHA-1: 45a549b8519128e227a2da8e7d47f1e2b2fb71f0
(0085083)
kgv   
2019-06-17 10:49   
Patch is ready for review.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR30782-master-KGV [^]
(0085084)
git   
2019-06-17 10:52   
Branch CR30782 has been updated forcibly by kgv.

SHA-1: 8fb843f1065a67982ca1cfa01df00117556b1116
(0085091)
git   
2019-06-17 14:35   
Branch CR30782 has been updated forcibly by kgv.

SHA-1: 3759d86d1e45d3b303077fea6a343b18a31a7572
(0085099)
git   
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   
2019-06-17 22:53   
Branch CR30782 has been updated forcibly by kgv.

SHA-1: 534c822e324a2e86aaf60156576166145a53acea
(0085120)
osa   
2019-06-18 15:55   
Reviewed without remarks
(0085144)
bugmaster   
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   
2019-06-22 16:22   
Branch CR30782 has been deleted by inv.

SHA-1: 534c822e324a2e86aaf60156576166145a53acea