[WASTE-list] weTagLineSpacing

Nancy.Lee at rrd.com Nancy.Lee at rrd.com
Thu May 4 07:26:08 EDT 2006





>>I guess that depends on what you want to happen should the user increase

>>or decrease the font size. If you want line spacing to remain 18.25 pts

>>regardless of font size, use absolute line spacing, like this:

>>

>> WELineSpacing lineSpacing;

>>

>> lineSpacing.mode = weTagLineSpacingAbsolute;

>> lineSpacing.value = FloatToFixed(18.25);



I tried to follow the above settings - but when the text is displayed - the
spacing between the lines is close to 2.5"??

Here is the code that I use when I first display the text edit window -
everything looks correct except for my linespacing. Do you see anything
that would be setting the line spacing incorrectly?

WESetOneAttribute(0,0,weTagTextColor,&rgbcolor_current,sizeof(rgbcolor_current),document->text);WESetOneAttribute(0,0,weTagAlignment,&kAlignmentMenuAlignments[0],sizeof(kAlignmentMenuAlignments[0]),document->text);

FMFontFamily fontFamily = useFONTID;
WESetOneAttribute(0,0,weTagFontFamily,&fontFamily,sizeof(fontFamily),document->text);

Fixed fixedfontSize = fontSize << 16);
WESetOneAttribute(0,0,weTagFontSize,&fixedfontSize,sizeof(fixedfontSize),document->text);

WELineSpacing lineSpacing;
lineSpacing.mode = weTagLineSpacingAbsolute;
lineSpacing.value = FloatToFixed(18.25);

WESetOneAttribute(0,0,weTagLineSpacing,&lineSpacing,sizeof(lineSpacing),document->text);

WEPut(0,0,(Ptr)textString.c_str(),strlen(textString.c_str()),textEncoding,kNilOptions,flavorCount,flavorTypes,flavorHandles,document->text);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://six.pairlist.net/pipermail/waste-list/attachments/20060504/6d4b75a6/attachment.htm


More information about the WASTE-list mailing list