View Single Post
12-04-09, 08:56 AM   #6
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
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.
__________________
「貴方は1人じゃないよ」

Last edited by haste : 12-04-09 at 09:00 AM.
  Reply With Quote