ambuda icon indicating copy to clipboard operation
ambuda copied to clipboard

line-spacing issue causes issues with certain scripts

Open suhasm opened this issue 2 years ago • 3 comments

A proofreader working with kannada has pointed out an issue where the bottommost part of certain aksharas get clipped. This causes some letters to appear like others. For instance vaṃśodbhava to appear like vaṃśodbava in the Kannada script. Can we increase the line spacing a bit? (Screenshot sent by proofreader attached) vamshod

suhasm avatar Feb 27 '23 15:02 suhasm

@akprasad / @shreevatsa , can this diff address this issue? This probably is a quick hack.

diff --git a/ambuda/templates/proofing/pages/editor-components.html b/ambuda/templates/proofing/pages/editor-components.html
index 8057096..ff6cdb4 100644
--- a/ambuda/templates/proofing/pages/editor-components.html
+++ b/ambuda/templates/proofing/pages/editor-components.html
@@ -239,7 +239,7 @@ Pass `class` explicitly so that Tailwind can regex-find it when it compiles. #}
   </div>
   <textarea id="content" name="content" required=""
     class="grow p-2 md:p-4 w-full resize-none"
-    :style="`font-size: ${textZoom}rem`"
+    :style="`font-size: ${textZoom}rem;line-height: 1.5`"
     @keydown="hasUnsavedChanges = true" spellcheck="false">{{ data }}</textarea>
 </div>

kvchitrapu avatar Mar 01 '23 00:03 kvchitrapu

Thanks for looking into this! I think you've found the right place, except for a couple of minor points:

  1. I think the current line-height is already 1.5 and should be increased a bit,
  2. I think the current convention is to prefer using Tailwind classes for these style things, which means that instead of directely setting line-height: 1.5 in the :style, we can try adding to the class="…" list something like leading-relaxed or leading-loose or leading-9 or leading-10 (whichever one looks good).

shreevatsa avatar Mar 01 '23 03:03 shreevatsa

I've merged #462, so please rebase to ensure a clean diff. I also agree with @shreevatsa 's comments -- when those are resolved, I'll merge.

akprasad avatar Mar 01 '23 05:03 akprasad