1

Please bear with me, I am new to Uniscribe so I hope this isn't a dumb question but I have been unable to find the solution anywhere else. So, here goes...

I am trying to use the Uniscribe API to reduce the width of a font; that is, given a specific font of a particular height, I would like to be able to reduce the width of each character (and all the relevant spacings) by some user-defined percentage.

I have successfully achieved this without calling any Uniscribe functions by obtaining a LOGFONT structure for the current font and adjusting the lfWidth field to be a percentage of its original value. I realise that this is just an average character width but it seemed to have the desired result.

However, when I try to do the same thing using Uniscribe I've noticed that the lfWidth field gets reset to 0 following calls to ScriptShape(). As a result, all rendered text is output using its original width. I'm at a loss to explain why this is or what to do to get around it.

Does anybody have any idea if it's even possible to do what I am trying to do?

Chris Young
  • 79
  • 2
  • 9

1 Answers1

0

You might want to start here (look at the Generate Glyph Information Section), then lead to this.

Hope it helps!

namar0x0309
  • 2,239
  • 1
  • 15
  • 15
  • Thanks for that. SciptShape() does not return a failure code though, so I assume that the currently loaded font is acceptable. Subsequent calls to ScriptPlace() also succeed, it's just that they end up using a value of 0 for lfWidth, not the customised value I had previously assigned. – Chris Young Jan 26 '11 at 14:20
  • I think I found a solution! It seems that any adjustments to the currently selected font, at least in terms of its width, need to be performed *after* the call to ScriptShape() but *before* the call to ScriptPlace(). Now things are being output as I expect them to be - the links provided by @namar0x0309 helped me to get there in the end, so thanks for that. – Chris Young Jan 31 '11 at 15:15