zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.14k stars 229 forks source link

BUG: Font size/type not changeable #1301

Open lumpidu opened 1 year ago

lumpidu commented 1 year ago

Your environment SYSTEM INFO: Obsidian version: v1.3.7 Installer version: v1.3.7 Operating system: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64 22.5.0 Login status: not logged in Insider build toggle: off Live preview: on Legacy editor: off Base theme: adapt to system Community theme: none Snippets enabled: 0 Restricted mode: off Plugins installed: 4 Plugins enabled: 2 1: Excalidraw v1.9.12 2: Remotely Save v0.3.25

Describe the bug

The default font is the small font. I cannot change font size via the proposed keyboard shortcuts on my German Keyboard.

To Reproduce

Expected behavior

Font size can be either changed by keyboard shortcuts or a tool widget

Additional context

The shortcuts <CMD><SHIFT><"<"> or <CMD><SHIFT><">"> (less or bigger signs) are a bad choice, e.g. for German/Swiss keyboards on a MAC because e.g. the bigger sign (">") can only be reached via <SHIFT> anyway. Therefore, it's not possible to activate the additional <SHIFT> resulting in an effective translation to <CMD><">">.

Additionally I cannot see any possibility to use the mouse to change the font size or select a different font type. Why not use the normal widgets for Excalidraw which are way more intuitive and complete than for the Excalidraw plugin ?

zsviczian commented 1 year ago

image

Shortcuts are a difficult topic. Obsidian overrides most Excalidraw shortcuts, and I decided not to mess with that because people might have different preferences. As for the choice of keys, that is something to discuss with Excalidraw.com.

However, it is relatively easy to create simple excalidraw scripts that automate these sort of actions, and you can assign you custom hotkeys to execute scripts.

lumpidu commented 1 year ago

Hi, thanks for the explanation with the tray mode. Exactly what I needed to know. As somebody used to the way excalidraw.com is functioning, I was quite puzzled to get the intuition of the different icon-palettes and -panels and I misinterpreted totally the "palette" icon as a color palette. Now where I see it in action, it's hard to forget it again :)

You mean the keyboard shortcuts are derived from excalidraw.com ? How does this work ? Do you have control over capturing the keyboard presses before Excalidraw gets them or how is it guaranteed there are no clashes between Excalidraw and Obsidian ? Are there any possibilities of configuring this ?