Article View: adobe.indesign.sdk
Article #175Re: Retrive text in textmodel with same font attributes
From: pallavik
Date: Thu, 26 Mar 2009 05:03
Date: Thu, 26 Mar 2009 05:03
24 lines
1397 bytes
1397 bytes
Hello All,
InterfacePtr<IComposeScanner> composeScanner(textModel, UseDefaultIID());
if (composeScanner == nil)
{
ASSERT(composeScanner);
break;
}
InterfacePtr<const IAttrReport> fontStyleAttrReport(composeScanner->QueryAttributeAt((const RangeData &)range, kTextAttrFontStyleBoss));
if (fontStyleAttrReport == nil)
{
ASSERT(fontStyleAttrReport);
break;
}
InterfacePtr<ITextAttrFont> fontStyleAttr(fontStyleAttrReport, UseDefaultIID());
if (fontStyleAttr == nil)
{
ASSERT_MSG(fontStyleAttr, "fontStyleAttr == nil");
break;
}
PMString fontStyleName(fontStyleAttr->GetFontName());
Using this code I am getting fontStyleName as null.
I have indesign text with 2 byte font haveing font style as Bold , Regular.
Please give some solution to solve this problem.
Technical Details
Message-ID:
<59b86134.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b86134.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f63e9,8bcfbdf5ea84e7ea X-Google-Attributes: gidf63e9,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: pallavik@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.indesign.sdk Subject: Re: Retrive text in textmodel with same font attributes Message-ID: <59b86134.0@webcrossing.la2eafNXanI> Date: Wed, 25 Mar 2009 22:03:30 -0700 References: <59b86134.-1@webcrossing.la2eafNXanI> Lines: 28 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit