高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】problem rendering japanese te
problem rendering japanese text
problem rendering japanese text
i have a couple of files which have japanese text in them, when i load them in odamfcapp it displays as "?". the shx font is m+192a9.shx, i believe the symbols arent present in simplex.shx as mechanical desktop substitutes it with simplex and it still displays as "?". is there a way i could get the text in them? its a large file (2mb), let me know if you need the file and i can email it you.
thanks.
you can send files me by email. it might be dwg and font (bigfont japanese)files . what default locale is set on your computer?
--
best regards,
sergey zaitcev
changing locale works for mech. desktop
i changed the locale to japanese and mechanical desktop was able to pull up the correct text data from the file, but odamfcapp still has problems. any ideas? i have emailed the file to sslezkin@softdev as i could not get your email address
thanks.
quote:
originally posted by eauser01
i changed the locale to japanese and mechanical desktop was able to pull up the correct text data from the file, but odamfcapp still has problems. any ideas?
thanks.
it is bug of dwgdirect. in real font is \m+1826c\m+18272 \m+1826f\m+196be\m+192a9. dwgdirect doesn't convert this facename in system code page. we will fix it in nearest update for 1.13. note in any case you need load file with convert code page(parameter of oddbhostappservices::readfile). see dwgdoctemplate.cpp in odamfcapp project line 158.
but were are two way make rendering approximate to original.
1. use font mapping file. you need:
- add string in map file for example: \m+1826c\m+18272 \m+1826f\m+196be\m+192a9;msgothic.ttc"
- make this file accessible for application.
note it doesn't work for acad .
2. rewrite oddbhostappservices::getsubstitutefont() in your hostappservices. for example in case name contents substring like "\m+1" method may return msgothic.ttc.
in case japanese locale isn't set it will work too but font must be installed certainly. more detail see dwgdirect reference part "font handling".
--
best regards,
sergey zaitcev
last edited by sergey z.; 27th april 2005 at 07:40 amfff">.
works when locale set to japanese
i rewrote oddbhostappservices::getsubstitutefont() to return msmincho.ttf and also set the code page conversion to true, it works when the locale is set to japanese, for english locale it renders as in the attached gif file (the font msmincho.ttf is installed). am i missing something?
also, instead of the ttf file if i return msgothic.ttc or msmincho.ttc (true type collection font) all the "?" text become blank, ie. it does not render them at all. any reason why it happens? does dwgdirect look for ttf fonts?
thanks.
attached images (64.6 kb, 14 views)
quote:
originally posted by eauser01
i rewrote oddbhostappservices::getsubstitutefont() to return msmincho.ttf and also set the code page conversion to true, it works when the locale is set to japanese, for english locale it renders as in the attached gif file (the font msmincho.ttf is installed). am i missing something?
i am sorry...for english locale(or any other) you need set in regional options "language setting for the system" option japanese(not default locale) . it needs for support converting mbcs to unicode.
quote:
originally posted by eauser01
also, instead of the ttf file if i return msgothic.ttc or msmincho.ttc (true type collection font) all the "?" text become blank, ie. it does not render them at all. any reason why it happens? does dwgdirect look for ttf fonts?
what version of dwgdirect do you use? i have tested with msgothic.ttc and msmincho.ttc (version dwgdirect 1.13). i get the correct result(system is windows2000 and default locale is russia). possible it is connected with described above problem.
--
best regards,
sergey zaitcev
|