View Single Post
12-04-09, 09:01 AM   #7
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
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
And once again this proves haste > all. (nah I just suck when it comes to string modification :P) My solution was a hack indeed
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote