mapbox / tiny-sdf

Browser-side SDF font generator
http://mapbox.github.io/tiny-sdf/
BSD 2-Clause "Simplified" License
568 stars 58 forks source link

Need some help understanding the code #10

Open gauravgrover95 opened 6 years ago

gauravgrover95 commented 6 years ago

Hi,

While I understand many things in the code. I am having confusions with the following variables. Can you kindly briefly describe what they are doing?

Thanks in advance.

lyuavery commented 4 years ago

i have the same confusions.Why radius is fontSize/3 ?Besides, 255 - 255 * (d / this.radius + this.cutoff) seems not being normalized to [0,1] according to valve's talk(https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf).Is this just a hacking around or something? I would appretiate if you could tell me something about this.