🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.indesign.sdk
2 messages
2 total messages Started by pallavik Mon, 23 Mar 2009 07:20
Retrive text with same font attributes
#153
Author: pallavik
Date: Mon, 23 Mar 2009 07:20
5 lines
828 bytes
Hello All ,
  I have text with different font style and size .
  I want to retrive text from textmodel with same font attributes like bold , regular , italic and it's size.
 I want to iterate textmodel data and retive text one by one with same font attributes.
So, Please give me the solution.
Re: Retrive text in textmodel with same font attributes
#175
Author: pallavik
Date: Thu, 26 Mar 2009 05:03
24 lines
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads