From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GMEdDq1M8GQc9QAAauVa8A:P1 (envelope-from ) for ; Thu, 31 Aug 2023 10:17:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GMEdDq1M8GQc9QAAauVa8A (envelope-from ) for ; Thu, 31 Aug 2023 10:17:49 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E06733ADE5 for ; Thu, 31 Aug 2023 10:17:48 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=mqNtatn8; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693469868; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=oHqyX1yDfhIyL7QGACikLiRjgwcUIswQjnAf6JVylDQ=; b=CPIOhToA2es1IzxYFuV0u7kngZTNQU+Bw0vE+TRKWeS7aKe4Xa6WvH/PQQYQ1/4ETzyqvw Ahk2/AP+cF1VISDQUbh6dAtpVSzmPGdZndM6Ktg597ByDIGGIkcaNhrxqC91XPtiPeb5we qEeaaN086wkzw9Q0FrLyGDya3ug0xK/hej83hOkITkAwgomd17GZRbB2Nm3U3H+rL3Pew8 jPXcjJ4Vb0hqPooccoWX12dp11LwBM433WuLQsdHGGawvGyjmqmtau2RGfaLbCP8jzXKx6 z7RZ/7RQ8zqNGtgIToQrYb+3jSSZjOocOrb9O0Yc04WfjXCco8DLN5EG1c4v6Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693469868; a=rsa-sha256; cv=none; b=LO9PvDxB7JFt9/NYmypmVvL0zAVyIHPuXzGIabEX1bYndqdyDMU0Zo770u4sHb7HFghEU3 IWa7bTmueZczq3VVPRYcTsu78t2qNa2FQR3rQvec27JWjfNych2fTclXnH8D9GkGXpzb/6 fBCASS/7nDyOkSfyfQkBhHI84KNI3uXOZiXpLELqLiVBi+a+ZZRKCzXPKUXDkahluS5cCi 3frB4cvd2MKzRYvOufbnoQB7kIjF4XaGM1CCI3BxbQbvF1cxHUKQxWKYgw/j2WYxEzvvAX f8AM/AFBU8gUno5fTn2BEoUmyga1r7Tv98QF96O3PqNxDAJCax6zD2+HnSXI/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=mqNtatn8; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbcrO-0007YQ-BN; Thu, 31 Aug 2023 04:17:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbcrM-0007YG-QO for emacs-orgmode@gnu.org; Thu, 31 Aug 2023 04:17:00 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbcrJ-0006ZY-MP for emacs-orgmode@gnu.org; Thu, 31 Aug 2023 04:17:00 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7FFCF240104 for ; Thu, 31 Aug 2023 10:16:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693469814; bh=UHRoymsEL29OTzlrOT/h98HGbuqLAQMvKjGTU4J936E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=mqNtatn899QaON1slv9OeQoIGvLwMlte9AlCaGtz3vWCaq0o/0atOYHO6aR77Zh4Q VxGaaeb6n6qOnkU612Jyd9zSo4VFI8x3bCdNR15EtwrMjzAp5p5w8KOOMb2Ndrrodn qKG2CqOagUh6vjClDn+F1l+9EiPiu1YLHfv53RjaICmbSsydZ4M9fLi96oGpZovQP8 WHczY92YjOoLr5c1A2P6xhpcv79fSDsJ4EQDFzlewZUfdMZMtfJIZYoCtGajqKs7Uw xt9eTyEF+4JQin4iFxkLP8m3wgjtDSbvl4sK/nCc+0+chhCx5m4Kd0fapRsveB6GCE KwWEWJOLX+Whg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RbvC93dQXz6twZ; Thu, 31 Aug 2023 10:16:53 +0200 (CEST) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= , Timothy Cc: orgmode Subject: Re: Fallback fonts in LaTeX export for non latin scripts In-Reply-To: <878r9t7x7y.fsf@posteo.net> References: <878r9t7x7y.fsf@posteo.net> Date: Thu, 31 Aug 2023 08:17:27 +0000 Message-ID: <87wmxbvd60.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.88 X-Spam-Score: -6.88 X-Migadu-Queue-Id: E06733ADE5 X-Migadu-Scanner: mx2.migadu.com X-TUID: Bq1ga/Epcddx Juan Manuel Mac=C3=ADas writes: > These days I'm working on some experimental code to try to provide Org > with some sort of fallbacks fonts on LaTeX export. The functionality > would (for now) be linked to LuaTeX + babel package, since XeTeX, > although it has the ucharclasses package, is more limited. Thanks! That would be a welcome addition. > The idea is to start from a defcustom that is an alist where each element > has the structure (script font). There would also be a default script + > font, for example ("latin" "Linux Libertine"). At the moment it would > only work for the default roman font, but it can be extended to default > sans serif, mono, etc. Are the fonts you have in mind shipped with LuaTeX distribution? > The functionality would not be activated by default. When activated, it > also enables LuaTeX as the default LaTeX engine, and on each export a > list of non-latin scripts in the buffer is extracted. Perhaps with > some code like this, which checks for any non-latin characters: > > (let ((scripts)) > (save-excursion > (goto-char (point-min)) > (while > (re-search-forward "\\([^\u0000-\u007F\u0080-\u00FF\u0100-\u017F]= \\)" nil t) > (let ((script (aref char-script-table > (string-to-char (match-string 1))))) > (add-to-list 'scripts script) > (setq script-list scripts)))) > script-list) > > ? > > Once the list has been extracted, an ad hoc preamble would be formatted > assigning each script the chosen font. > > WDYT? Do you think this would be a viable path? I think that in a few > days I can offer something usable for discussion. Adding Timothy to CC. His WIP conditional preamble branch looks suitable to add the proposed functionality. What will happen if LuaTeX is not installed on the system? Also, just to double check, is LuaTeX fully compatible to LaTeX? That is, if we have an existing org file using LaTeX-specific commands and packages, will it work with LuaTeX? --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at