Delete Icon
This forum is now read-only. Please use our new forums at
0 points
Submitted by Maciej Wiercioch
6 years ago

Can I change the size of the dots?

As you should know from How does alphabet.js work?, the third value (with index 2, because we are counting from 0) of every point object corresponds to the size of the dot. So we have to multiply or add desired value to point[2]. If you change the size of the font then you probably want to multiply it by fontSizeMultiplier, this is very good idea! You have only to change this parameter of g.push method:



point[2] * fontSizeMultiplier,

But if you want to change only size of the dots - feel free to do that as well. If you want to make dots two times bigger your code should look like this:

if (document.alphabet.hasOwnProperty(cc_hex)) {
    var chr_data = document.alphabet[cc_hex].P;
    var bc = letterColors[ix % letterColors.length];

    for (var i = 0; i < chr_data.length; ++i) {
        point = chr_data[i];

        g.push(new Point(point[0] + offset,

            // because of this multiplication our dots will be two times bigger 
            point[2] * 2,

            makeColor(bc, point[3])));
    offset += document.alphabet[cc_hex].W;

example of big dots

Return to Frequently Asked Questions