ijprest / keyboard-layout-editor

Web application to enable the design & editing of keyboard layouts
http://www.keyboard-layout-editor.com/
Other
1.3k stars 241 forks source link

What's the use of the "Legend Size"/f/f2 parameter? #232

Closed c933103 closed 6 years ago

c933103 commented 6 years ago

Are they supposed to change the displayed font size? But why there doesn't seems to be any effect after I pressed them? Also, how can I change the aspect ratio of the used glyph?

ijprest commented 6 years ago

All that said: if you change the "Legend Size" in the editor, it should clear any size-overrides on the selected key(s)... i.e., it would remove any 'f2' and 'fa' parameters and set the 'f' parameter.

It seems to be working in my limited testing (on the default numpad+introduction-text layout). If you have a particular layout it's not working on, please reply with your link, and the steps you're taking.

ijprest commented 6 years ago

To change the aspect ratio, I'd probably do something like this:

  1. Wrap your legend in an HTML tag that won't get removed by the sanitizer, e.g., <span>.
  2. Use the "Custom Styles" feature to change the aspect ratio, e.g., the following squish anything in a <span> tag by 50% in the horizontal direction only:

    span { display:inline-block; transform: scalex(0.5); }

c933103 commented 6 years ago

A not-working example: http://www.keyboard-layout-editor.com/##@_name=Demo%20test%3B&@_t=%23800000&f:2&fa@:3&:0&:0&:0&:0&:0&:1%3B&w:1.25%3B&=%E3%81%8C%E3%81%AA%ED%95%9C%EA%B8%80%0A%E6%BC%A2%E5%AD%97%ED%95%9C%EC%9E%90%0A%0A%0A%0A%0A%E3%82%AB%E3%83%8A%E3%84%93%E3%84%A8

Note that I tried to give different text different character size using different features here but all of them are of same size even after all those changes.

ijprest commented 6 years ago

Seems to be working on my system... though admittedly my system is English, so it may be picking up different fonts, or something.

Can you tell what font is being used?

Also: what browser are you using?

c933103 commented 6 years ago

My browser is Chrome on Windows My current font setting via a font extension in chrome: Proportional Standard/Serif: Yu Gothic San-serif: Yu Mincho Fixed width: MS Gothic Minimum font sizeL 12px (Is that what prevented the tool from working correctly?) Edit: Yeap that's the cause