(calc-set-mode-line)
(calc-check-defines)
(if calc-buffer-list (setq calc-stack (copy-sequence calc-stack)))
- (add-to-list 'calc-buffer-list (current-buffer) t))
+ (add-to-list 'calc-buffer-list (current-buffer) t)
+ ;; While Calc buffers are read only, the on screen keyboard should
+ ;; be displayed in order to accept user input.
+ (setq-local touch-screen-display-keyboard t))
(defvar calc-check-defines 'calc-check-defines) ; Suitable for run-hooks.
(defun calc-check-defines ()
(calc-grab-region (region-beginning) (region-end) nil)
(when (= (prefix-numeric-value arg) -2)
(calc-keypad))))
- (when (get-buffer-window "*Calc Keypad*")
- (calc-keypad)
- (set-buffer (window-buffer)))
- (if (derived-mode-p 'calc-mode)
- (calc-quit)
- (calc-create-buffer)
- (setq calc-was-keypad-mode nil)
- (if (or (eq full-display t)
- (and (null full-display) calc-full-mode))
- (switch-to-buffer (current-buffer) t)
- (if (get-buffer-window (current-buffer))
- (select-window (get-buffer-window (current-buffer)))
- (if calc-window-hook
- (run-hooks 'calc-window-hook)
- (let ((w (get-largest-window)))
- (if (and pop-up-windows
- (> (window-height w)
- (+ window-min-height calc-window-height 2)))
- (progn
- (setq w (split-window w
- (- (window-height w)
- calc-window-height 2)
- nil))
- (set-window-buffer w (current-buffer))
- (select-window w))
- (pop-to-buffer (current-buffer)))))))
- (with-current-buffer (calc-trail-buffer)
- (and calc-display-trail
- (calc-trail-display 1 t)))
- (message (substitute-command-keys
- (concat "Welcome to the GNU Emacs Calculator! \\<calc-mode-map>"
- "Press \\[calc-help] or \\[calc-help-prefix] for help, \\[calc-quit] to quit")))
- (run-hooks 'calc-start-hook)
- (and (windowp full-display)
- (window-point full-display)
- (select-window full-display))
- (and calc-make-windows-dedicated
- (set-window-dedicated-p nil t))
- (calc-check-defines)
- (when (and calc-said-hello interactive)
- (sit-for 2)
- (message ""))
- (setq calc-said-hello t))))
+ ;; If the selected window changes here, Emacs may think that the
+ ;; selected window is read only, and no on screen keyboard should
+ ;; be displayed. Make sure that any active on screen keyboard is
+ ;; not hidden by accident.
+ (let ((touch-screen-display-buffer t))
+ (when (get-buffer-window "*Calc Keypad*")
+ (calc-keypad)
+ (set-buffer (window-buffer)))
+ (if (derived-mode-p 'calc-mode)
+ (calc-quit)
+ (calc-create-buffer)
+ (setq calc-was-keypad-mode nil)
+ (if (or (eq full-display t)
+ (and (null full-display) calc-full-mode))
+ (switch-to-buffer (current-buffer) t)
+ (if (get-buffer-window (current-buffer))
+ (select-window (get-buffer-window (current-buffer)))
+ (if calc-window-hook
+ (run-hooks 'calc-window-hook)
+ (let ((w (get-largest-window)))
+ (if (and pop-up-windows
+ (> (window-height w)
+ (+ window-min-height calc-window-height 2)))
+ (progn
+ (setq w (split-window w
+ (- (window-height w)
+ calc-window-height 2)
+ nil))
+ (set-window-buffer w (current-buffer))
+ (select-window w))
+ (pop-to-buffer (current-buffer)))))))
+ (with-current-buffer (calc-trail-buffer)
+ (and calc-display-trail
+ (calc-trail-display 1 t)))
+ (message (substitute-command-keys
+ (concat "Welcome to the GNU Emacs Calculator! \\<calc-mode-map>"
+ "Press \\[calc-help] or \\[calc-help-prefix] for help, \\[calc-quit] to quit")))
+ (run-hooks 'calc-start-hook)
+ (and (windowp full-display)
+ (window-point full-display)
+ (select-window full-display))
+ (and calc-make-windows-dedicated
+ (set-window-dedicated-p nil t))
+ (calc-check-defines)
+ (when (and calc-said-hello interactive)
+ (sit-for 2)
+ (message ""))
+ (setq calc-said-hello t)))))
;;;###autoload
(defun full-calc (&optional interactive)
if (recursion_count > 16)
return 1;
- /* Don't defer offsets. */
- defer_offsets = false;
-
for (j = 0; j < glyph->compound->num_components; ++j)
{
/* Look up the associated subglyph. */
if (!subglyph)
return 1;
+ /* Don't defer offsets. This variable is set if the component
+ glyph is a compound glyph that is anchored to a previously
+ decomposed point, and needs its coordinates adjusted after
+ decomposition completes. */
+ defer_offsets = false;
+
/* Record the size of the point array before expansion. This
will be the base to apply to all points coming from this
subglyph. */
sfnt_lerp_half (struct sfnt_point *control1, struct sfnt_point *control2,
struct sfnt_point *result)
{
- result->x = control1->x + ((control2->x - control1->x) >> 1);
- result->y = control1->y + ((control2->y - control1->y) >> 1);
+ result->x = control1->x + ((control2->x - control1->x) / 2);
+ result->y = control1->y + ((control2->y - control1->y) / 2);
}
/* Decompose contour data inside X, Y and FLAGS, between the indices
if (recursion_count > 16)
return "Overly deep recursion in compound glyph data";
- /* Don't defer offsets. */
- defer_offsets = false;
-
/* Pacify -Wmaybe-uninitialized. */
point = point2 = 0;
if (!subglyph)
return "Failed to obtain component glyph";
+ /* Don't defer offsets. This variable is set if the component
+ glyph is a compound glyph that is anchored to a previously
+ decomposed point, and needs its coordinates adjusted after
+ decomposition completes. */
+ defer_offsets = false;
+
/* Record the size of the point array before expansion. This
will be the base to apply to all points coming from this
subglyph. */
sfnt_f2dot14 *intermediate_end)
{
int i;
- sfnt_fixed coord, start, end;
+ sfnt_fixed coord, start UNINIT, end UNINIT;
sfnt_fixed scale;
/* scale is initially 1.0. */
/* Load values for this axis, scaled up to sfnt_fixed. */
coord = coords[i] * 4;
+ /* GCC warns about start and end being used when uninitialized,
+ but they are used only if intermediate_p. */
+
if (intermediate_p)
{
start = intermediate_start[i] * 4;