Jump to content

DllCalls Win API and AutoIt standards, measurements and internals


AXLE
 Share

Recommended Posts

Hi all, just a quick update on GetCharABCWidthsFloatW.

I think I am close to getting it nailed. Returns an array of ABCFLOAT stuctures with A & B & C float values for each font in the character set. In other words 65535 character ABC widths for type WCHAR. This can then be compared against each character in a given string for the individual width or added to create the length of the given string.

At current I am getting identical results to GetTextExtentPoint32W using Arial and 0(Zero) widths for A & C and results are incorrect, so issue with Font handle, DC or something. I can't offer an update to the above ATM as all is done in C first. When I nail this last quirk I will update the AutoIt code and post =)

P.S. I am also uncertain if GetCharABCWidthsFloatW can check Kerning pairs as it only seams possible to check a single character from the given string, or my methodology is wrong lol.

"Writing code to carry out an intended set of tasks is relatively easy.
Writing code to carry out ONLY an intended set of tasks, well that can be a little more challenging."

Alex Maddern

Link to comment
Share on other sites

Thanks junkew, appreciate the tip on that. CLR interfaces will come in handy down the road as I have to do one of the .NET language modules as part of my current tertiary studies. I think VB.net. For now though I'll stay inside of my comfort zone with C. So basically I am creating the equivalent of AutoIt UDFs in C where it is all easier to check and test Mem, Pointers and returns etc then move that into the same in UDF.au3. It mostly gives me the opportunity to see the same Win-API functions working side by side from both a C and AutoIt perspective. I intend on using C and AutoIt side by side, so its just my way of getting intimate with that, and If I can post some of the results and workings for others to benefit, then I hope that's a good thing =)

Edited by AXLE
spelling correction

"Writing code to carry out an intended set of tasks is relatively easy.
Writing code to carry out ONLY an intended set of tasks, well that can be a little more challenging."

Alex Maddern

Link to comment
Share on other sites

  • 2 months later...

Hi Peoples, Just a quick update and apology for being off the grid for a while. Study and other commitments have had me under the pump over recent months. Should be back to the Charwidth and other dll usage examples soon 😃

"Writing code to carry out an intended set of tasks is relatively easy.
Writing code to carry out ONLY an intended set of tasks, well that can be a little more challenging."

Alex Maddern

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...