i.e. I have width/height of text, which must be written, i.e. 100/300 and I want to write a text "HELLO". How can I write text such as that text will be with width=100 and height=300 ?
I try following:
Illustrator.CharacterStyle curStyle = curDok.CharacterStyles.Add("ColorText");
Illustrator.CharacterAttributes charAttr = curStyle.CharacterAttributes;
charAttr.FillColor = ilColor;
charAttr.Size = Convert.ToInt32(FontSize * 2.5F);
//charAttr.HorizontalScale = charAttr.HorizontalScale;
//charAttr.VerticalScale = charAttr.VerticalScale;
Illustrator.TextFont newFont = null;
if (!string.IsNullOrEmpty(sFont))
foreach (Illustrator.TextFont curFont in appIll.TextFonts)
if (curFont.Name.Contains(sFont))
newFont = curFont;
if (newFont != null)
charAttr.TextFont = newFont;
double dHeight = 0;
double dWidth = 0;
if (!string.IsNullOrEmpty(Text))
{
Illustrator.TextFrame curTextFrame = curDok.TextFrames.Add();
curTextFrame.Contents = Text;
curTextFrame.Top = 0;
//curTextFrame.BlendingMode = Illustrator.AiBlendModes.aiDarken;
if (hScale > 0)
{
curTextFrame.Width = 100;
curTextFrame.Height = 300;
}
curStyle.ApplyTo(curTextFrame.TextRange, false);
dHeight = curTextFrame.Height / 2;
dWidth = curTextFrame.Width / 2;
}
but text is not on fully my rectangle


