better letter-spacing
This commit is contained in:
@@ -32,11 +32,11 @@ for (const txt of titles) {
|
|||||||
let wdth_wght_ratio = wdth*wght / 10000;
|
let wdth_wght_ratio = wdth*wght / 10000;
|
||||||
console.log('wdth_wght_ratio',wdth_wght_ratio);
|
console.log('wdth_wght_ratio',wdth_wght_ratio);
|
||||||
|
|
||||||
char.style.letterSpacing = wdth_wght_ratio < 1 ? "0.2em" : ital ? "0.05em" : 0;
|
// char.style.letterSpacing = wdth_wght_ratio < 1 ? "0.5em" : ital ? "0.05em" : 0;
|
||||||
if (ital) {
|
if (ital) {
|
||||||
let prev_char = char.previousSibling;
|
let prev_char = char.previousSibling;
|
||||||
if (prev_char) {
|
if (prev_char) {
|
||||||
prev_char.style.letterSpacing = "0.1em";
|
char.style.letterSpacing = prev_char.style.letterSpacing = "0.03em";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user