Thread Tools Display Modes
01-10-18, 05:20 PM   #1
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 84
Pixel Perfect 1px font outline

So I'm wondering how I could achieve a pixel perfect outline on font strings.

An exmaple are these unitframes:



On the left side i'm using a shadow with 1, -1 offset. On the right side (target) I'm just using "THINOUTLINE" sadly THINOUTLINE looks really mushy and not as crisp as I want it to be. Without the outline it looks clean so I don't think font scaling is an issue. How can I achieve a clean 1 px black outline on my font?

The shadow is nice but its after all still a shadow and not an outline, which means only one side is covered here.
  Reply With Quote
01-10-18, 08:52 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Try disabling all font shadows (:SetShadowOffset(0,0)) and use the 'MONOCHROMEOUTLINE' font flag.
  Reply With Quote
01-11-18, 03:35 AM   #3
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 84
Thanks that's what i was looking for

Looks pretty bad sadly. Guess the Font I'm using is not optimized for it.


Last edited by gempir : 01-11-18 at 04:17 AM.
  Reply With Quote
01-11-18, 05:58 AM   #4
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by gempir View Post
Thanks that's what i was looking for

Looks pretty bad sadly. Guess the Font I'm using is not optimized for it.

Looks like your font size is too big
  Reply With Quote
01-11-18, 07:09 AM   #5
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 84
Maybe yeah but smaller doesn't really look better and bigger wouldn't fit.


Last edited by gempir : 01-11-18 at 07:12 AM.
  Reply With Quote
01-11-18, 09:38 AM   #6
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Keep in mind, the MONOCHROME flag only works well with actual pixel fonts.
  Reply With Quote
01-11-18, 11:08 AM   #7
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 84
uhh okay? Could you give me some examples? What are ACTUAL pixel fonts?
This is the one I'm using https://www.dafont.com/squarefont.font

it's a really nice font and works almost everywhere but the outline looks shitty as you can see.
  Reply With Quote
01-11-18, 11:26 AM   #8
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
That's not a pixel font. If you want examples just look at the font on many older 8-bit or 16-bit games.

  Reply With Quote
01-11-18, 01:09 PM   #9
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Look for something in this "Pixel/Bitmap" category on dafont
https://www.dafont.com/bitmap.php
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-11-18, 01:44 PM   #10
JDoubleU00
A Firelord
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 463
Originally Posted by Ammako View Post
That's not a pixel font. If you want examples just look at the font on many older 8-bit or 16-bit games.

Don't forget this classic:

http://us.blizzard.com/en-us/games/a...archive-2.html

I can't figure out how to post screenshots.
__________________
Author of JWExpBar and JWRepBar.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Pixel Perfect 1px font outline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off