MantisBT - Community
View Issue Details
0031719Community[OCCT] OCCT:Visualizationpublic2020-08-19 18:092020-09-14 10:55
Vico Liang 
bugmaster 
normalminor 
closedduplicate 
[OCCT] 7.4.0 
[OCCT] 7.5.0 
0031719: no default Chinese Unicode support
Graphic3d_Text has issue when drawing Chinese unicode text.It will draw a placeholder rectangle. Is it possible to draw unicode such as Chinese for any font selected? It's difficult to know which font should be used in program.
No tags attached.
duplicate of 0031720closed bugmaster Community Visualization, Font_FontMgr - register one more CJK fallback font available on newer Android devices 
related to 0030782closed bugmaster Open CASCADE Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets 
Issue History
2020-08-19 18:09Vico LiangNew Issue
2020-08-19 18:09Vico LiangAssigned To => kgv
2020-08-19 19:01kgvRelationship addedrelated to 0030782
2020-08-19 19:12kgvNote Added: 0093553
2020-08-19 19:13kgvAssigned Tokgv => Vico Liang
2020-08-19 19:13kgvStatusnew => feedback
2020-08-19 20:20kgvRelationship addedduplicate of 0031720
2020-08-19 20:21Vico LiangNote Added: 0093554
2020-08-19 20:22Vico LiangNote Edited: 0093554bug_revision_view_page.php?bugnote_id=93554#r23215
2020-08-20 11:20Vico LiangAssigned ToVico Liang => kgv
2020-08-31 15:21kgvNote Added: 0093765
2020-08-31 15:21kgvAssigned Tokgv => bugmaster
2020-08-31 15:21kgvResolutionopen => duplicate
2020-08-31 15:21kgvProduct Version => 7.4.0
2020-09-14 10:55bugmasterStatusfeedback => closed

Notes
(0093553)
kgv   
2020-08-19 19:12   
Please be more specific on use case:
- Text example.
- System (including version).
- Warnings/errors emitted by Font Manager (consider enabling logging Trace (Message_Trace) messages in addition to defaults).

Here is a Draw Harness sample from 0030782:
pload MODELING VISUALIZATION
dtracelevel trace
vfont -verbose 1
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 t2 "简体中文 (Chinese)"    -pos  0  2 0 -halign left  -font cjk
vdrawtext t3 "简体中文 (Chinese)"    -pos 10  3 0 -halign right -font sans


Application may specify font explicitly, based on its knowledge of properties of system fonts or with help of extra fonts shipped with application itself.

OCCT defines several fallback fonts for CJK glyphs (as Western fonts usually do not provide CJK glyphs and specialized CJK fonts has poor support of Western subset), but as OCCT doesn't ship any fonts, the availability of these specific fonts depends on a system. Fallback list could be extended to handle new / changed systems considering new fonts coming with the system.

Another alternative is probing all system fonts for available UNICODE subsets in case of absence of predefined one, but picking an arbitrary font might be not good.
(0093554)
Vico Liang   
2020-08-19 20:21   
(edited on: 2020-08-19 20:22)
It works well if the font is selected correctly. I see the fallback solution for such Unicode, i thought it would work.In most cases, the font is available and the problem might be the fallback not working.

(0093765)
kgv   
2020-08-31 15:21   
Dear bugmaster,

please close as duplicate of 0031720.