Is it correct that TextArea.Font.GetTextWidth isn't updated when kerning is enabled and changed for the TextArea?
Kerning and GetTextWidth
Re: Kerning and GetTextWidth
Support · Jul 27, 2011Hello,
The GetTextWidth method of the TextArea class should return the text width depending on the kerning value you set to it.
Please send over the sample code which you are using to our support team at: [^a|mailto:support@cete.com|opennewiwndow|support@cete.com^]. This information will help them to do some testing and find the cause for this behavior.
Thanks,
ceTe Software Support Team.
Re: Kerning and GetTextWidth
Forum member · Jul 28, 2011 Dim MyDocument As New ceTe.DynamicPDF.Document
Dim MyPage As ceTe.DynamicPDF.Page = New ceTe.DynamicPDF.Page()
Dim myTextAreaNormal As New ceTe.DynamicPDF.PageElements.TextArea("testing kerning and width", 100, 100, 200, 10)
Dim myTTF As New ceTe.DynamicPDF.Text.OpenTypeFont("c:\windows\fonts\verdana.ttf")
myTextAreaNormal.Font = myTTF
myTextAreaNormal.FontSize = 12
MyPage.Elements.Add(myTextAreaNormal)
MessageBox.Show("without kerning: " & myTextAreaNormal.Font.GetTextWidth("testing kerning and width", 12))
Dim myTextAreaKerning As New ceTe.DynamicPDF.PageElements.TextArea("testing kerning and width", 100, 150, 200, 10)
myTextAreaKerning.Font = myTTF
myTextAreaKerning.FontSize = 12
myTextAreaKerning.KerningEnabled = True
Dim MyKernValues As ceTe.DynamicPDF.Text.KerningValues = myTextAreaKerning.GetKerningValues()
For i As Integer = 0 To MyKernValues.Spacing.Length - 1
MyKernValues.Spacing(i) = Short.Parse((MyKernValues.Spacing(i) - 100).ToString)
Next
MyPage.Elements.Add(myTextAreaKerning)
MyDocument.Pages.Add(MyPage)
MyDocument.Draw("c:\temp\testJunk.pdf")
MessageBox.Show("with kerning: " & myTextAreaKerning.Font.GetTextWidth("testing kerning and width", 12))
Will return 154,417 for both textareas!
Re: Kerning and GetTextWidth
Support · Jul 28, 2011Hello,
We did some testing on our end and we found it is a bug in our API. We have created bug for this issue and reported to our developers. We will post a reply once this issue is fixed.
Thanks,
ceTe Software Support Team.
Re: Kerning and GetTextWidth
Forum member · Sep 18, 2011Any progress on this?
Re: Kerning and GetTextWidth
Support · Sep 19, 2011Hello,
Our developers are still looking into this issue and once the build with the fix is ready for download we will post it in our forum.
Thanks,
ceTe Software Support Team
Re: Kerning and GetTextWidth
Forum member · Nov 6, 2011Still no fix to this problem???
Re: Kerning and GetTextWidth
Support · Nov 7, 2011Hello,
Our developers have released a fix for this issue, please email [^a|mailto:support@cete.com|opennewwindow|support@cete.com^] and include the link to this forum post as a reference so we can send you the new build that fixes this issue.
Thanks,
ceTe Software Support Team.