2.7.1 svg output text with mixed fonts
2.7.1 svg output text with mixed fonts
hi,
i am using dwgdirect 2.7.1 odamfcapp to export the attached drawing to a svg but the output that not export the text correcly.
please see the attached files and compare "text_with_c_degrees_dwg.jpg" => image from odamfcapp 2.7.1.
with "text_with_c_degrees_svg.jpg" => image of intenet explorer svg view
also with "text_with_c_degrees_list.jpg" => from autocad the using the list comand
could you advice on how to export the text to svg (when text has mixed fonts).
the compiler i am using is "microsoft visual c++ 2005".
regards.
luis
attached images
yes, thee seems to be a bug in svg export.
try the attached file - is it displayed correctly?
(i have some trouble with svg viewer curently - it does not display chinese characters at all)
attached files (2.4 kb, 1 views)
vladimir
hi vkalinin,
i have try your test.svg and it displays correctly please see attached "test_svg.jpg" file.
i wonder if it is possible for you to send me the fix so i can implement it.
with regards to your svg viewer problems, in order to display svg files with foreign languages you need to download the appropriate viewer from:
regards,
luis
attached images (47.6 kb, 3 views)
thanks for the info about the viewer - i wonder - why not to make it to support unicode?
about the fix: it will be available with 2.7.2 but i cannot post it, because it is not compatible with 2.7.1
the problem is that one of the header files required to implement the fix was not public in 2.7.1, and w/o it it is impossible to determine correct bigfont code page, to translate mbcs <-> unicode symbols.
(the bug in export was that in shx font embedded in svg glyph indices were corresponding to mbcs characters, not unicode ones, in case of large asian shx'es)
vladimir
thanks vkalinin,
quote:
i wonder - why not to make it to support unicode?
adobe has stopped developing the viewer.
quote:
adobe svg viewer download area
please note that adobe has announced that it will discontinue support for adobe svg viewer on january 1, 2009.
i wonder if you could help me, i would like to create an application based on the oda example singledoc that will export a dwg/dxf file to a svg. but i do not know how to implement:
code:
...
void codamfcappdoc:

nexportsvg()
{
odgsmoduleptr pmodule = :

drxdynamiclinker()->loadmodule(l"dd_svgexport.drx");
if (pmodule.isnull())
afxmessagebox( _t("dd_svgexport.drx is missing") );
else
{
// svgout command parameters explanation see in \exports\svgexport\source\svgexport.cpp, svgexportcommand::execute()
if (m_pdb->appservices()->getfiledia())
executecommand(l"svgout 1 6 \n\n.png sans-serif 768 1024 yes yes\n");
else
executecommand(l"svgout ~\n1 6 \n\n.png sans-serif 768 1024 yes yes\n");
}
}
...my basic problem is that i do not know how to get a "oddbcommandcontextptr pcmdctx" from the application. this is how is done in odamfcappdoc.
code:
...
void codamfcappdoc::executecommand(const odstring& scmd, bool becho)
{
odsavestate<int> save_m_ncmdactive(m_ncmdactive);
++m_ncmdactive;
oddbcommandcontextptr pcmdctx = cmdctx();
...
oddbcommandcontextptr codamfcappdoc::cmdctx()
{
if(m_pcmdctx.isnull())
{
m_pcmdctx = exdbcommandcontext::createobject(cmdio(), m_pdb);
}
return m_pcmdctx;
}
...
odedbaseio* codamfcappdoc::cmdio()
{
return this;
}any hints or sample code will be very grateful.
once more thanks for your help.
regards,
luis
you don't need command framework to use the export.
look at the implementation of teh svgout command at the bottom of \exports\svgexport\source\svgexport.cpp
vladimir