in dd 2.603,the odcharmapper::addbigfontwithindex method is
in dd 2.603,the odcharmapper::addbigfontwithindex method is not effect
hi ,all
in dd 2.31 the addbigfontwithindex method is ok,but in 2.603 is not effect ,some fonts desplay ?, the code has not changed,why,please help me!
could you explain your situation more detail? there are many reasons why fonts display "?". addbigfontwithindex is not enough for correct display. it provides right coding text with these fonts. check is your big font access for application (see findfile() method). possible sample drawing and font will be helpful.
best regards,
sergey z.
hi,sergey z.
i add the addbigfontwithindex method in the odamfcapp's initinstance method. the current dir have some acad's shx files, but some word desplay ?
code:
cstring strfilename;
cstring strfilepath;
tchar exefullpath[max_path];
cfilefind finder;
cstring strpath;
getmodulefilename(afxgetinstancehandle(),exefullpath,max_path);
strpath=(cstring)exefullpath;
// afxmessagebox(strpath,mb_ok);
int position=strpath.reversefind('\\');
strpath=strpath.left(position+1);
cstring pcont=strpath+"*.shx";
// afxmessagebox(pcont,mb_ok);
bool bworking = finder.findfile(pcont);
while(bworking)
{
bworking=finder.findnextfile();
//strfilepath=finder.getfilepath();
strfilename=finder.getfilename();
// afxmessagebox(strpath+strfilename,mb_ok);
//加入有路径的字体
//odcharmapper::addbigfontwithindex( _t("c:\\r13\\com\\fonts\\whgtxt.shx"), 3);
odcharmapper::addbigfontwithindex(odstring(strpath+strfilename),5);
// afxmessagebox(strpath+strfilename,mb_ok);
}i add messagebox in the findfile(),i see some fonts have been found ,but have some filename is "".
the debug code is :
code:
odstring codamfcappapp::findfile(const odstring& file, oddbbasedatabase* pdb,
oddbbasehostappservices::findfilehint hint)
{
afxmessagebox(file);
odstring sfile = exhostappservices::findfile(file, pdb, hint);please help me.
attached files (150.6 kb, 3 views)
last edited by
apoon@futuredial.com; 29th october 2008 at 10:23 pmfff">.
hello
quote:
originally posted by
apoon@futuredial.com
odcharmapper::addbigfontwithindex( _t("c:\\r13\\com\\fonts\\whgtxt.shx"), 3);
odcharmapper::addbigfontwithindex(odstring(strpath +strfilename),5);
// afxmessagebox(strpath+strfilename,mb_ok);
you needn't use full name in addbigfontwithindex() method. right call is addbigfontwithindex(_t("whgtxt.shx"), 3). this functionality is used for conversion unicode to mbcb and reverse. findfile() must return full path for font file. you may add own algorithm in thise method. in any words findfile() must return
"c:\\r13\\com\\fonts\\whgtxt.shx" in your case.
best regards,
sergey z.
thank you!
the problem has resolved.