高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】fonts not read
fonts not read
fonts not read
hello,
i am using v2.3.0 of the library to read dwg files.
i read the files using the code
odinitialize( &m_sfodsvcs );
odgsinitialize();
followed by a readfile(...) call.
where m_sfodsvcs is declared as odrxobjectimpl<sfodservices>
i am trying to to access fonts in the dwg file as
oddbtextstyletableptr pteststyletable = m_poddb->gettextstyletableid().safeopenobject();
i then iterate over pteststyletable using a oddbsymboltableiteratorptr. i get the oddbobjectid using oddbsymboltableiteratorptr::getrecordid() and get a oddbtextstyletablerecordptr using safeopenobject().
my understading is that oddbtextstyletablerecordptr::filename() should give me the name of the font file used. however, it does not read and return all the fonts in the file. version 1.1.3 could read and return the font names.
in case this information helps somebody give me pointers to my mistake, odamfcapp also fails to read the fonts in the dwg file. i tried storing the associated font file in windows fonts folder, in the folder containng the dwg file and in the folder containing odamfcapp.exe. it failed to load fonts in all cases.
abhijit
> odamfcapp also fails to read the fonts in the dwg file
do you mean that the texts are displayed incorrectly in odamfcapp?
on windows dd uses windows functions to access ttf fonts so they must be installed. shx fonts are accessed directly.
also a file illustrating the problem would be helpful.
sergey slezkin
|