From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Different fonts per region Date: Wed, 2 Mar 2016 14:17:31 +0100 Message-ID: <20160302131731.GB10700@tuxteam.de> References: <871t7t40e3.fsf@posteo.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed X-Trace: ger.gmane.org 1456926761 1431 80.91.229.3 (2 Mar 2016 13:52:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Mar 2016 13:52:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 02 14:52:32 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ab7CZ-00017b-Og for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Mar 2016 14:52:31 +0100 Original-Received: from localhost ([::1]:56582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ab7CZ-0001kB-DC for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Mar 2016 08:52:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ab7CO-0001k4-6q for help-gnu-emacs@gnu.org; Wed, 02 Mar 2016 08:52:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ab7CK-0001O3-Tj for help-gnu-emacs@gnu.org; Wed, 02 Mar 2016 08:52:20 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:42254 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ab7CK-0001Nb-O0 for help-gnu-emacs@gnu.org; Wed, 02 Mar 2016 08:52:16 -0500 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1ab6eh-00032V-58 for help-gnu-emacs@gnu.org; Wed, 02 Mar 2016 14:17:31 +0100 In-Reply-To: <871t7t40e3.fsf@posteo.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109401 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, Mar 02, 2016 at 11:52:52AM +0100, henry atting wrote: > Okay, I can change the font per buffer, frame, mode or set another > default font. > Is it also possible to set the font per region, say have three different > regions in a buffer with three different fonts? > Just to know if it's possible; outside emacs it would be of little avail > anyway. Yes. There are basically two mechanisms you can attach attributes to: "text properties" and "overlays". In both cases one of those properties is a "face" property, which (among many other things like colours) determines the font this text is to be displayed with. This face property is either a name of some previously defined thing or a list of name-value pairs for each of the properties. See the relevant part in the Emacs Lisp manual, either in your local copy or possibly online here[1] [2] [3] [1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Text-Properties.html#Text-Properties [2] https://www.gnu.org/software/emacs/manual/html_node/elisp/Special-Properties.html#Special-Properties [3] https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces.html#Faces > > henry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlbW5+sACgkQBcgs9XrR2kZSLwCfUB8KRemocbW5AXd+4aqKK02O MlsAniNLB0/xncGe5yRSsyh47SjPswmt =D3bT -----END PGP SIGNATURE-----