Inverse Powerline Triangle evolution
Finii opened this issue · 4 comments
Finii commented
> also noticed that the inverse + regular don't line up correctly such that they form a perfect arrow
That problem is already mentioned right in the top of this thread/PR, with a possible fix given in #1490 (comment) above (I sketched exactly that image on paper there ;)
The culprit are the 'landing platforms' on the left resp right that help avoid the vertical colored lines problem.
Are these adjacent triangular things a common setup?
I'll add the new patched font into this comment in a minute...
Edit:
Green is the new outline:
--- a/font-patcher
+++ b/font-patcher
@@ -853,8 +853,8 @@ class font_patcher:
box_enabled = False # Cowardly not scaling existing glyphs, although the code would allow this
# Stretch 'xz' or 'pa' (preserve aspect ratio)
- # Supported params: overlap | careful | xy-ratio | dont_copy | ypadding
- # Overlap value is used horizontally but vertically limited to 0.01
+ # Supported params: overlap | voverlap | careful | xy-ratio | dont_copy | ypadding
+ # Overlap value is used horizontally but vertically limited to 0.01 (or specified by voverlap)
# Careful does not overwrite/modify existing glyphs
# The xy-ratio limits the x-scale for a given y-scale to make the ratio <= this value (to prevent over-wide glyphs)
# '1' means occupu 1 cell (default for 'xy')
@@ -878,8 +878,8 @@ class font_patcher:
0xe0b3: {'align': 'r', 'valign': 'c', 'stretch': '^xy', 'params': {'xy-ratio': 0.7}},
# Inverse arrow tips
- 0xe0d6: {'align': 'l', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.05, 'xy-ratio': 0.7}},
- 0xe0d7: {'align': 'r', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.05, 'xy-ratio': 0.7}},
+ 0xe0d6: {'align': 'l', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.05, 'xy-ratio': 0.7, 'voverlap': 0.0}},
+ 0xe0d7: {'align': 'r', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.05, 'xy-ratio': 0.7, 'voverlap': 0.0}},
# Rounded arcs
0xe0b4: {'align': 'l', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.06, 'xy-ratio': 0.59}},
@@ -1502,8 +1502,9 @@ class font_patcher:
logger.critical("Conflicting params: overlap and ypadding")
sys.exit(1)
if overlap:
+ voverlap = sym_attr['params'].get('voverlap')
scale_ratio_x *= 1.0 + (self.font_dim['width'] / (sym_dim['width'] * scale_ratio_x)) * overlap
- y_overlap = min(0.01, overlap) # never aggressive vertical overlap
+ y_overlap = voverlap if voverlap is not None else min(0.01, overlap) # never aggressive vertical overlap
scale_ratio_y *= 1.0 + (self.font_dim['height'] / (sym_dim['height'] * scale_ratio_y)) * y_overlap
# Size in x to size in y ratio limit (to prevent over-wide glyphs)
(Took actually not 'a minute' but 40 😬 )
Originally posted by @Finii in #1490 (comment)
Finii commented
Thoughts
- This glyphs are probably only used for clients with transparency, so optimise for that
- We could also shift the inner corner one-landing-platform-width to the inside