Improve Arabic text display when printing the schedule
Add print-specific CSS to force Arabic web font and enable ligatures for proper shaping in print mode. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 93b31a62-139b-4870-b40e-2ffc4ec05a8d Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/Ow4s0aa Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -357,3 +357,33 @@
|
||||
.em-blink { animation: none; opacity: 1; }
|
||||
}
|
||||
|
||||
/*
|
||||
* #350 (browser print): When the user prints the Executive Meetings
|
||||
* schedule via the browser (Ctrl+P / "Save as PDF"), Chrome sometimes
|
||||
* falls back to a system font that has Arabic glyphs but no GSUB
|
||||
* shaping table. The result is Arabic text rendered as isolated,
|
||||
* unconnected letterforms — and because the browser then runs the
|
||||
* bidi algorithm on those isolated glyphs, the text appears reversed
|
||||
* (e.g. "قائمة" prints as "ةمئاق").
|
||||
*
|
||||
* Fix: in print mode, force the printable schedule region onto a
|
||||
* web font that we ship with the app and that has full Arabic
|
||||
* shaping (Tajawal). Also explicitly enable common-ligatures and
|
||||
* contextual-alternates (`liga`, `calt`) which drive Arabic joining,
|
||||
* and pin direction to RTL when the page is in Arabic so Chrome
|
||||
* doesn't mis-resolve bidi for cells whose first glyph is Latin.
|
||||
*/
|
||||
@media print {
|
||||
html, body, body * {
|
||||
font-family: "Tajawal", "DIN Next LT Arabic",
|
||||
"Helvetica Neue LT Arabic", "Segoe UI", Tahoma, Arial, sans-serif !important;
|
||||
font-feature-settings: "liga" 1, "calt" 1, "rlig" 1 !important;
|
||||
-webkit-font-feature-settings: "liga" 1, "calt" 1, "rlig" 1 !important;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
html[dir="rtl"] #executive-schedule-printable {
|
||||
direction: rtl;
|
||||
unicode-bidi: isolate;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user