unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24582: 25.1; liga incorrect work (prettify-symbols-mode)
@ 2016-10-01 10:52 hafner
  2016-10-02 18:13 ` bug#24582: 25.1; liga incorrect work hafner
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: hafner @ 2016-10-01 10:52 UTC (permalink / raw)
  To: 24582

[-- Attachment #1: Type: text/plain, Size: 8395 bytes --]


code:(cons (car x)      (concat (list ?\C-i)              (list (decode-char 'ucs (cdr x))))
macos: https://postimg.org/image/oz1dqfr9vlinux: work fine




In GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F34)) of 2016-10-01 built on hakuWindowing system distributor 'Apple', version 10.3.1265Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs/25.1/share/info/emacs --prefix=/usr/local/Cellar/emacs/25.1 --without-x --with-xml2 --without-dbus --without-gnutls --with-rsvg --with-ns --disable-ns-self-contained'
Configured features:JPEG RSVG NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
Important settings:  value of $LANG: ru_RU.UTF-8  locale-coding-system: utf-8-unix
Major mode: Scala
Minor modes in effect:  rainbow-delimiters-mode: t  magit-auto-revert-mode: t  global-git-commit-mode: t  async-bytecomp-package-mode: t  company-statistics-mode: t  dired-omit-mode: t  evil-commentary-mode: t  ensime-mode: t  shell-dirtrack-mode: t  diff-hl-margin-minor-mode: t  diff-hl-margin-mode: t  diff-hl-flydiff-mode: t  global-diff-hl-mode: t  diff-hl-mode: t  diff-auto-refine-mode: t  flyspell-mode: t  evil-vimish-fold-mode: t  vimish-fold-global-mode: t  vimish-fold-mode: t  flx-ido-mode: t  ido-ubiquitous-mode: t  yas-minor-mode: t  projectile-mode: t  global-company-mode: t  company-mode: t  evil-leader-mode: t  global-undo-tree-mode: t  undo-tree-mode: t  evil-mode: t  evil-local-mode: t  whitespace-mode: t  global-hl-line-mode: t  show-paren-mode: t  recentf-mode: t  savehist-mode: t  save-place-mode: t  global-auto-revert-mode: t  electric-pair-mode: t  tooltip-mode: t  global-eldoc-mode: t  electric-indent-mode: t  mouse-wheel-mode: t  prettify-symbols-mode: t  menu-bar-mode: t  file-name-shadow-mode: t  global-font-lock-mode: t  font-lock-mode: t  blink-cursor-mode: t  auto-composition-mode: t  auto-encryption-mode: t  auto-compression-mode: t  size-indication-mode: t  column-number-mode: t  line-number-mode: t  auto-fill-function: do-auto-fill  transient-mark-mode: t
Recent messages:Quit [2 times]Updating buffer list...Formats have changed, recompiling...doneUpdating buffer list...doneibuffer-vc: groups setMark setUpdating buffer list...doneibuffer-vc: groups setmwheel-scroll: End of bufferDo you want to submit a report on CC Mode? (y or n) n
Load-path shadows:/Users/kornev/.emacs.d/.packages/scala-mode-20160902.525/ob-scala hides /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/org/ob-scala/Users/kornev/.emacs.d/.packages/seq-2.16/seq hides /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/emacs-lisp/seq
Features:(shadow sort mail-extr emacsbug sendmail reporter vc-mtn vc-hg vc-bzrvc-src vc-sccs vc-svn vc-cvs vc-rcs ensime-company scala-modescala-mode-prettify-symbols scala-mode-imenu scala-mode-mapscala-mode-fontlock scala-mode-indent scala-mode-paragraphscala-mode-lib browse-url executable vc-git company-yasnippetrainbow-delimiters flycheck rx subr-x eink-theme aspirin-js-pretest jadeseq-25 jade-scratch jade-nodejs jade-chrome jade-webkit jade-debuggerjade-interaction js2-mode jade-inspector websocket jade-backendjade-repl js sgml-mode cc-mode cc-fonts cc-guess cc-menus cc-cmdscc-styles cc-align cc-engine cc-vars cc-defs jade-render jade-facesaspirin-magit-pretest evil-magit magit-blame magit-stash magit-bisectmagit-remote magit-commit magit-sequence magit magit-apply magit-wipmagit-log magit-diff smerge-mode magit-core magit-autorevertmagit-process magit-popup magit-mode magit-git crm magit-sectionmagit-utils git-commit log-edit message rfc822 mml mml-sec epg mm-decodemm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drumsmailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editorasync-bytecomp async server aspirin-tramp-pretest aspirin-ediff-pretestevil-ediff ediff-merg ediff-wind ediff-diff ediff-mult ediff-helpediff-init ediff-util ediff aspirin-common-pretest company-statisticsdired-x evil-commentary evil-commentary-integration aspirin-common cruxaspirin-json aspirin-r aspirin-scala aspirin-python aspirin-haskellaspirin-emacs-lisp aspirin-org ob-scala ensime ensime-sbt sbt-modesbt-mode-rgrep sbt-mode-comint sbt-mode-buffer sbt-mode-projectsbt-mode-vars ensime-http ensime-ui ensime-semantic-highlight ensime-docensime-search ensime-undo ensime-startup ensime-refactor ensime-popupensime-notes ensime-model ensime-mode ensime-inspector imenuensime-goto-testfile ensime-editor popup ensime-debug gdb-mi bindat gudensime-stacktrace ensime-inf ensime-completion-util scala-mode-syntaxensime-config ensime-util ensime-client ensime-vars flymake hideshowarc-mode archive-mode url-gw ensime-macros cl ob-R ob-haskell ob-sh orgorg-macro org-footnote org-pcomplete org-list org-faces org-entitiesnoutline outline org-version ob-emacs-lisp org-loaddefs find-funccal-menu calendar cal-loaddefs ob-ipython python tramp-sh tramptramp-compat tramp-loaddefs trampver shell format-spec dash-functionalob-python ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keysob-comint ob-core ob-eval org-compat org-macs aspirin-yaml aspirin-csvaspirin-xml aspirin-markdown aspirin-silver-searcher aspirin-termaspirin-eshell aspirin-shell aspirin-buffer-menu ibuf-macs ibuffer-vcaspirin-ligatures aspirin-translit+ quail diff-hl-margin diff-hl-diredaspirin-vcs diff-hl-flydiff diff-hl vc-dir ewoc vc vc-dispatcherdiff-mode easy-mmode aspirin-spell-checker flyspell ispellaspirin-translate google-translate google-translate-default-uigoogle-translate-core-ui google-translate-core google-translate-tk urlurl-proxy url-privacy url-expand url-methods url-history url-cookieurl-domsuf url-util url-parse auth-source gnus-util mm-util help-fnsmail-prsvr password-cache url-vars mailcap json map aspirin-sessionsaspirin-fold evil-vimish-fold vimish-fold f dash s aspirin-ido smexflx-ido flx ido-ubiquitous ido-completing-read+ cus-edit cus-startcus-load ido aspirin-eink-theme aspirin-config derivedaspirin-programming yasnippet projectile ibuf-ext ibuffer grep pcompleteesh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groupseshell esh-module esh-mode esh-util compile comint ansi-colorcompany-oddmuse company-keywords company-etags etags xref cl-seq projecteieio eieio-core cl-macs company-gtags company-dabbrev-codecompany-dabbrev company-files company-capf company-cmake company-xcodecompany-clang company-semantic company-eclim company-templatecompany-css company-nxml company-bbdb company let-alist aspirin-editorkey-seq key-chord avy evil-leader evil evil-integration undo-tree diffevil-maps evil-commands evil-jumps evil-command-window evil-typesevil-search evil-ex evil-macros evil-repeat evil-states evil-coreevil-common windmove thingatpt rect evil-digraphs evil-vars ringaspirin-appearance whitespace diminish hl-line paren aspirin-behaviorls-lisp dired bookmark pp recentf tree-widget wid-edit savehistsaveplace autorevert filenotify elec-pair edmacro kmacroaspirin-packages finder-inf advice info package epg-config seq byte-optgv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefspcase cl-lib aspirin-core time-date mule-util cyril-util tooltip eldocelectric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-winucs-normalize term/common-win tool-bar dnd fontset image regexp-optfringe tabulated-list newcomment elisp-mode lisp-mode prog-mode registerpage menu-bar rfn-eshadow timer select scroll-bar mouse jit-lockfont-lock syntax facemenu font-core frame cl-generic cham georgianutf-8-lang misc-lang vietnamese tibetan thai tai-viet lao koreanjapanese eucjp-ms cp51932 hebrew greek romanian slovak czech europeanethiopic indian cyrillic chinese charscript case-table epa-hookjka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadviceloaddefs button faces cus-face macroexp files text-properties overlaysha1 md5 base64 format env code-pages mule custom widgethashtable-print-readable backquote kqueue cocoa ns multi-ttymake-network-process emacs)
Memory information:((conses 16 778604 430538) (symbols 48 60350 1) (miscs 40 179 1138) (strings 32 151431 403810) (string-bytes 1 4659397) (vectors 16 115054) (vector-slots 8 2250743 299605) (floats 8 9836 9217) (intervals 56 6307 1023) (buffers 976 23))

[-- Attachment #2: Type: text/html, Size: 11230 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#24582: 25.1; liga incorrect work
  2016-10-01 10:52 bug#24582: 25.1; liga incorrect work (prettify-symbols-mode) hafner
@ 2016-10-02 18:13 ` hafner
  2016-10-02 19:50   ` Eli Zaretskii
  2016-10-05 11:05 ` bug#24582: Fwd: " hafner
  2016-10-05 11:15 ` bug#24582: 25.1; liga incorrect work (dublicate) eli
  2 siblings, 1 reply; 10+ messages in thread
From: hafner @ 2016-10-02 18:13 UTC (permalink / raw)
  To: 24582


[-- Attachment #1.1: Type: text/plain, Size: 79 bytes --]

Add images. Font PragmataPro 0.824 On linux work fine, bun incorrect on macOS.

[-- Attachment #1.2: Type: text/html, Size: 372 bytes --]

[-- Attachment #2: one.png --]
[-- Type: image/png, Size: 194132 bytes --]

[-- Attachment #3: two.png --]
[-- Type: image/png, Size: 9449 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#24582: 25.1; liga incorrect work
  2016-10-02 18:13 ` bug#24582: 25.1; liga incorrect work hafner
@ 2016-10-02 19:50   ` Eli Zaretskii
       [not found]     ` <KTBc6t3--3-0@tutanota.com>
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2016-10-02 19:50 UTC (permalink / raw)
  To: hafner; +Cc: 24582

> Date: Sun, 2 Oct 2016 20:13:44 +0200 (CEST)
> From: <hafner@tutanota.com>
> 
> Add images. Font PragmataPro 0.824 On linux work fine, bun incorrect on macOS.

I'm sorry, but I still don't understand what is the problem you want
to report.  Could you please be more specific, or show just the
part(s) that are incorrect on display and explain why?

Thanks.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#24582: 25.1; liga incorrect work
       [not found]     ` <KTBc6t3--3-0@tutanota.com>
@ 2016-10-04  6:30       ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2016-10-04  6:30 UTC (permalink / raw)
  To: hafner; +Cc: 24582

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

[Please keep the bug address on the CC list at all times.]

> Date: Tue, 4 Oct 2016 00:18:33 +0200 (CEST)
> From:  <hafner@tutanota.com>
> 
> Hello. I update files and attach them.

(I attach the files below for those who didn't get the original mail.)

So the problem is text alignment due to display of characters such as
⇒, is that right?

If so, please see which font is used on each of the two systems to
display these arrow characters, I'm guessing that the misalignment
happens because a different font is used for the arrows.  If that is
the case, it is normal, not a bug.

You can display the font being used by "C-u C-x =" when the cursor is
on the character in question.


[-- Attachment #2: one_updated.png --]
[-- Type: image/png, Size: 234693 bytes --]

[-- Attachment #3: two_updated.png --]
[-- Type: image/png, Size: 10332 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#24582: Fwd: Re: bug#24582: 25.1; liga incorrect work
  2016-10-01 10:52 bug#24582: 25.1; liga incorrect work (prettify-symbols-mode) hafner
  2016-10-02 18:13 ` bug#24582: 25.1; liga incorrect work hafner
@ 2016-10-05 11:05 ` hafner
  2016-10-05 11:15 ` bug#24582: 25.1; liga incorrect work (dublicate) eli
  2 siblings, 0 replies; 10+ messages in thread
From: hafner @ 2016-10-05 11:05 UTC (permalink / raw)
  To: Eli Zaretskii, 24582


[-- Attachment #1.1: Type: text/plain, Size: 929 bytes --]



 > So the problem is text alignment due to display of characters such as

 > ⇒, is that right?



Yes

 

> 4. Oct 2016 09:30 by > eliz@gnu.org> :
>
>
>> [Please keep the bug address on the CC list at all times.]
>>
>>> Date: Tue, 4 Oct 2016 00:18:33 +0200 (CEST)
>>> From:  <>>> hafner@tutanota.com>>> >
>>>
>>> Hello. I update files and attach them.
>>
>> (I attach the files below for those who didn't get the original mail.)
>>
>> So the problem is text alignment due to display of characters such as
>> ⇒, is that right?
>>
>> If so, please see which font is used on each of the two systems to
>> display these arrow characters, I'm guessing that the misalignment
>> happens because a different font is used for the arrows.  If that is
>> the case, it is normal, not a bug.
>>
>> You can display the font being used by "C-u C-x =" when the cursor is
>> on the character in question.

[-- Attachment #1.2: Type: text/html, Size: 2266 bytes --]

[-- Attachment #2: screen.png --]
[-- Type: image/png, Size: 412042 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#24582: 25.1; liga incorrect work (dublicate)
  2016-10-01 10:52 bug#24582: 25.1; liga incorrect work (prettify-symbols-mode) hafner
  2016-10-02 18:13 ` bug#24582: 25.1; liga incorrect work hafner
  2016-10-05 11:05 ` bug#24582: Fwd: " hafner
@ 2016-10-05 11:15 ` eli
  2016-10-06 23:25   ` YAMAMOTO Mitsuharu
  2 siblings, 1 reply; 10+ messages in thread
From: eli @ 2016-10-05 11:15 UTC (permalink / raw)
  To: eliz, 24582

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

Please see the attached screenshot.

> So the problem is text alignment due to display of characters such as
> ⇒, is that right?
Yes

-- 
  
  Eli

[-- Attachment #2: screen.png --]
[-- Type: image/png, Size: 412042 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#24582: 25.1; liga incorrect work (dublicate)
  2016-10-05 11:15 ` bug#24582: 25.1; liga incorrect work (dublicate) eli
@ 2016-10-06 23:25   ` YAMAMOTO Mitsuharu
  2020-08-11 13:55     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: YAMAMOTO Mitsuharu @ 2016-10-06 23:25 UTC (permalink / raw)
  To: hafner; +Cc: 24582

>>>>> On Wed, 05 Oct 2016 14:15:34 +0300, eli@fastmail.com said:

> Please see the attached screenshot.
>> So the problem is text alignment due to display of characters such
>> as ⇒, is that right?
> Yes

I could reproduce it with Hasklig 11pt.  Does the following patch work
for you?

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

diff --git a/src/macfont.m b/src/macfont.m
index 16e489d..eb7dcd9 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -1123,7 +1123,10 @@ struct macfont_metrics
      glyph width.  The `width_int' member is an integer that is
      closest to the width.  The `width_frac' member is the fractional
      adjustment representing a value in [-.5, .5], multiplied by
-     WIDTH_FRAC_SCALE.  For synthetic monospace fonts, they represent
+     WIDTH_FRAC_SCALE.  For monospace fonts, non-zero `width_frac'
+     means `width_int' is further adjusted to a multiple of the
+     (rounded) font width, and `width_frac' represents adjustment per
+     unit character.  For synthetic monospace fonts, they represent
      the advance delta for centering instead of the glyph width.  */
   signed width_frac : WIDTH_FRAC_BITS, width_int : 16 - WIDTH_FRAC_BITS;
 };
@@ -1150,6 +1153,27 @@ enum metrics_status
 #define LCD_FONT_SMOOTHING_LEFT_MARGIN	(0.396f)
 #define LCD_FONT_SMOOTHING_RIGHT_MARGIN	(0.396f)
 
+/* If FONT is monospace and WIDTH can be regarded as a multiple of its
+   width where the multiplier is greater than 1, then return the
+   multiplier.  Otherwise return 0.  */
+static int
+macfont_monospace_width_multiplier (struct font *font, CGFloat width)
+{
+  struct macfont_info *macfont_info = (struct macfont_info *) font;
+  int multiplier = 0;
+
+  if (macfont_info->spacing == MACFONT_SPACING_MONO
+      && font->space_width != 0)
+    {
+      multiplier = lround (width / font->space_width);
+      if (multiplier == 1
+	  || lround (width / multiplier) != font->space_width)
+	multiplier = 0;
+    }
+
+  return multiplier;
+}
+
 static int
 macfont_glyph_extents (struct font *font, CGGlyph glyph,
                        struct font_metrics *metrics, CGFloat *advance_delta,
@@ -1194,13 +1218,38 @@ macfont_glyph_extents (struct font *font, CGGlyph glyph,
       else
         fwidth = mac_font_get_advance_width_for_glyph (macfont, glyph);
 
-      /* For synthetic mono fonts, cache->width_{int,frac} holds the
-         advance delta value.  */
-      if (macfont_info->spacing == MACFONT_SPACING_SYNTHETIC_MONO)
-        fwidth = (font->pixel_size - fwidth) / 2;
-      cache->width_int = lround (fwidth);
-      cache->width_frac = lround ((fwidth - cache->width_int)
-                                  * WIDTH_FRAC_SCALE);
+      if (macfont_info->spacing == MACFONT_SPACING_MONO)
+	{
+	  /* Some monospace fonts for programming languages contain
+	     wider ligature glyphs consisting of multiple characters.
+	     For such glyphs, simply rounding the combined fractional
+	     width to an integer can result in a value that is not a
+	     multiple of the (rounded) font width.  */
+	  int multiplier = macfont_monospace_width_multiplier (font, fwidth);
+
+	  if (multiplier)
+	    {
+	      cache->width_int = font->space_width * multiplier;
+	      cache->width_frac = lround ((fwidth / multiplier
+					   - font->space_width)
+					  * WIDTH_FRAC_SCALE);
+	    }
+	  else
+	    {
+	      cache->width_int = lround (fwidth);
+	      cache->width_frac = 0;
+	    }
+	}
+      else
+	{
+	  /* For synthetic mono fonts, cache->width_{int,frac} holds
+	     the advance delta value.  */
+	  if (macfont_info->spacing == MACFONT_SPACING_SYNTHETIC_MONO)
+	    fwidth = (font->pixel_size - fwidth) / 2;
+	  cache->width_int = lround (fwidth);
+	  cache->width_frac = lround ((fwidth - cache->width_int)
+				      * WIDTH_FRAC_SCALE);
+	}
       METRICS_SET_STATUS (cache, METRICS_WIDTH_VALID);
     }
   if (macfont_info->spacing == MACFONT_SPACING_SYNTHETIC_MONO)
@@ -1237,6 +1286,10 @@ macfont_glyph_extents (struct font *font, CGGlyph glyph,
                                     / (CGFloat) (WIDTH_FRAC_SCALE * 2));
               break;
             case MACFONT_SPACING_MONO:
+	      if (cache->width_frac)
+		bounds.origin.x += - ((cache->width_frac
+				       / (CGFloat) (WIDTH_FRAC_SCALE * 2))
+				      * (cache->width_int / font->space_width));
               break;
             case MACFONT_SPACING_SYNTHETIC_MONO:
               bounds.origin.x += (cache->width_int
@@ -1273,7 +1326,16 @@ macfont_glyph_extents (struct font *font, CGGlyph glyph,
                                  / (CGFloat) (WIDTH_FRAC_SCALE * 2)));
           break;
         case MACFONT_SPACING_MONO:
-          *advance_delta = 0;
+	  if (cache->width_frac)
+	    *advance_delta = 0;
+	  else
+	    {
+	      CGFloat delta = - ((cache->width_frac
+				  / (CGFloat) (WIDTH_FRAC_SCALE * 2))
+				 * (cache->width_int / font->space_width));
+
+	      *advance_delta = (force_integral_p ? round (delta) : delta);
+	    }
           break;
         case MACFONT_SPACING_SYNTHETIC_MONO:
           *advance_delta = (force_integral_p ? cache->width_int
@@ -3139,7 +3201,7 @@ macfont_shape (Lisp_Object lgstring)
       struct mac_glyph_layout *gl = glyph_layouts + i;
       EMACS_INT from, to;
       struct font_metrics metrics;
-      int xoff, yoff, wadjust;
+      int xoff, yoff, wadjust, multiplier;
 
       if (NILP (lglyph))
         {
@@ -3192,7 +3254,11 @@ macfont_shape (Lisp_Object lgstring)
 
       xoff = lround (gl->advance_delta);
       yoff = lround (- gl->baseline_delta);
-      wadjust = lround (gl->advance);
+      multiplier = macfont_monospace_width_multiplier (font, gl->advance);
+      if (multiplier)
+	wadjust = font->space_width * multiplier;
+      else
+	wadjust = lround (gl->advance);
       if (xoff != 0 || yoff != 0 || wadjust != metrics.width)
         {
           Lisp_Object vec;





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* bug#24582: 25.1; liga incorrect work (dublicate)
  2016-10-06 23:25   ` YAMAMOTO Mitsuharu
@ 2020-08-11 13:55     ` Lars Ingebrigtsen
  2020-08-11 20:01       ` Alan Third
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-11 13:55 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: hafner, 24582, Alan Third

YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:

>> Please see the attached screenshot.
>>> So the problem is text alignment due to display of characters such
>>> as ⇒, is that right?
>> Yes
>
> I could reproduce it with Hasklig 11pt.  Does the following patch work
> for you?

This was more than three years ago, but there was no followup.  The
patch still applies to Emacs 28, and it compiles and runs on Macos
without any immediately adverse effects.

Alan, does this patch look reasonable to you?

> -     WIDTH_FRAC_SCALE.  For synthetic monospace fonts, they represent
> +     WIDTH_FRAC_SCALE.  For monospace fonts, non-zero `width_frac'
> +     means `width_int' is further adjusted to a multiple of the
> +     (rounded) font width, and `width_frac' represents adjustment per
> +     unit character.  For synthetic monospace fonts, they represent

[...]

> +/* If FONT is monospace and WIDTH can be regarded as a multiple of its
> +   width where the multiplier is greater than 1, then return the
> +   multiplier.  Otherwise return 0.  */
> +static int
> +macfont_monospace_width_multiplier (struct font *font, CGFloat width)
> +{

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#24582: 25.1; liga incorrect work (dublicate)
  2020-08-11 13:55     ` Lars Ingebrigtsen
@ 2020-08-11 20:01       ` Alan Third
  2020-08-12 11:16         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Third @ 2020-08-11 20:01 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: hafner, 24582

On Tue, Aug 11, 2020 at 03:55:13PM +0200, Lars Ingebrigtsen wrote:
> YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> 
> >> Please see the attached screenshot.
> >>> So the problem is text alignment due to display of characters such
> >>> as ⇒, is that right?
> >> Yes
> >
> > I could reproduce it with Hasklig 11pt.  Does the following patch work
> > for you?
> 
> This was more than three years ago, but there was no followup.  The
> patch still applies to Emacs 28, and it compiles and runs on Macos
> without any immediately adverse effects.
> 
> Alan, does this patch look reasonable to you?

I really have very little grasp on macfont.m, but it's Yamamoto
Mitsuharu's code, so I would tend to go along with him.
-- 
Alan Third





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#24582: 25.1; liga incorrect work (dublicate)
  2020-08-11 20:01       ` Alan Third
@ 2020-08-12 11:16         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-12 11:16 UTC (permalink / raw)
  To: Alan Third; +Cc: hafner, 24582

Alan Third <alan@idiocy.org> writes:

> I really have very little grasp on macfont.m, but it's Yamamoto
> Mitsuharu's code, so I would tend to go along with him.

OK; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-08-12 11:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-01 10:52 bug#24582: 25.1; liga incorrect work (prettify-symbols-mode) hafner
2016-10-02 18:13 ` bug#24582: 25.1; liga incorrect work hafner
2016-10-02 19:50   ` Eli Zaretskii
     [not found]     ` <KTBc6t3--3-0@tutanota.com>
2016-10-04  6:30       ` Eli Zaretskii
2016-10-05 11:05 ` bug#24582: Fwd: " hafner
2016-10-05 11:15 ` bug#24582: 25.1; liga incorrect work (dublicate) eli
2016-10-06 23:25   ` YAMAMOTO Mitsuharu
2020-08-11 13:55     ` Lars Ingebrigtsen
2020-08-11 20:01       ` Alan Third
2020-08-12 11:16         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).