View Single Post
12-04-09, 09:48 AM   #9
Star1814
A Defias Bandit
Join Date: Oct 2008
Posts: 3
Originally Posted by haste View Post
Except that the above solution is a horrible hack which will break on multi-byte letters. That being said, the underlying library which blizzard uses for fonts in WoW does support vertical text. We don't have access to this however, as the WoW engine most likely doesn't implement it.

We could of course just do:
lua Code:
  1. function vertical(str)
  2.    -- Dealing with multi-byte?
  3.    local _, len = str:gsub("[^\128-\193]", "")
  4.  
  5.    -- nah...
  6.    if(len == #str) then
  7.       return str:gsub(".", "%1\n")
  8.    else
  9.       return str:gsub("([%z\1-\127\194-\244][\128-\191]*)", "%1\n")
  10.    end
  11. end

edit: damn drycoding, fixed the syntax error.
Dying to try this and hope it works. However, how would I actually go about implementing this, properly? I mean, I only wish to let certain elements have this vertical text.

Switching from Pitbull4 to oUF is something I'm willing to do to make this work -- though at first glance the intense Lua editing for a layout scared me away.

I've a more or less clearcut image in my head how I want my unitframes to look like (Photoshop wins sometimes :>), and at this point Pitbull4 won't let me accomplish that (vertical text being only one of them).
  Reply With Quote