![mac increase font size on display 2 mac increase font size on display 2](https://images.iskysoft.com/pdfelement/pdf-tips/pdf2go3.jpg)
In my view the ideal case when designing for these, or actually any type of display is to use ems instead of pixels as you could just do screen and (-webkit-min-device-pixel-ratio : 1.5), Now, I assume that WebKit on a MacBook with Retina display scales the page about twice it's size as most web pages are not built to adapt to the higher pixel density? " NOTE: This event only works in Linux and macOS.I don't have a Retina MacBook myself to test these things out, and there seems to be a lot of confusion on the internet about web design on high pixel density displays. " Bind Control + Mouse-wheel to zoom text. If l:newsize >= l:minfontsize & l:newsize :call AdjustFontSize('-') Let l:end = l:matches " Characters at the end. Let l:size = l:matches " Font-size numbers. Let l:start = l:matches " Characters at the start. Let l:matches = matchlist(&guifont, l:pattern) " (\D*$) Capture group 3: Match any character 0 or more times to the end of the string.
![mac increase font size on display 2 mac increase font size on display 2](https://cdn.osxdaily.com/wp-content/uploads/2016/02/large-text-size-increase-system-font-size-mac-os-x-1.jpg)
" (\d+) Capture group 2: Match 1 or more times. " (^\D) Capture group 1: Anchored at the start of the string, match any character that is not 1 or more times non-greedy. " A multiplatform pattern for Linux, Windows, and macOS:
![mac increase font size on display 2 mac increase font size on display 2](https://www.fontspring.com/images/typo-graphic-design/4d/ae34/typo-ping-pong.png)
" Linux &guifont: Hack\ Nerd\ Font\ Mono\ Regular\ 10
#Mac increase font size on display 2 windows#
" Windows and macOS &guifont: Hack\ NF:h11:cANSI This version works in Linux, Windows, and macOS.Įchoerr "You need to run a GUI version of Vim to use this function." If (newsize >= s:minfontsize) & (newsize 0) || (newsize >= s:minfontsize)) & ((a:amount < 0) || (newsize <= s:maxfontsize))Įchoerr "You need to run the GTK2 or GTK3 version of Vim to use this function."
![mac increase font size on display 2 mac increase font size on display 2](https://user-media-prod-cdn.itsre-sumo.mozilla.net/uploads/gallery/images/2021-05-20-11-42-45-f506ce.png)
Support for GTK3 and out-of-range cursize Ĭode below works with GTK3 (unfortunately I can't test against GTK2) as well as with cursize values outside of. Name it something like vim.ahk, and put it inside this folder to have it be executed automatically on startup C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. SetWorkingDir %A_ScriptDir% Ensures a consistent starting directory. SendMode Input Recommended for new scripts due to its superior speed and reliability. #Warn Enable warnings to assist with detecting common errors. You will see a preview of the selected font size under the Standard font, Serif font, Sans-serif font, and Fixed-width font font types. (see screenshot at bottom) Adjusting the Font size slider here will show as a Custom font size in Option One. #NoEnv Recommended for performance and compatibility with future AutoHotkey releases. 4 You can adjust the Font size slider to the size (Tiny to Large) you want. If you're on windows, you can use AutoHotkey to circumvent this issue.Ĭreate an autohotkey script ( ), and put the following inside it: If you want to be able to use and, this is currently not possible inside (g)vim as they don't map to a (unique) ascii-code (read more about it here !topic/vim_dev/EZT_Q0YRmAM). You can add 'g' to the last argument of the substitute command above to 'globally' replace all the font sizes. :echo &guifont Andale_Mono:h10,Menlo:h10,Consolas:h10 If you have multiple fonts listed, such as submatch(0) The text that matched (this example finds 12 with \d\+).Įval() Evaluate the following string (12+1). \= Following is an expression to be evaluated. The replacement string \=eval(submatch(0)+1) uses: The \zs marks the start of what is found (so it skips the :h). The substitute pattern :h\zs\d\+ looks for :h followed by a number (one or more digits). Nnoremap :silent! let &guifont = substitute(įor example, the command :echo &guifont might show Bitstream_Vera_Sans_Mono:h12:b:cANSI. If (newsize >= s:minfontsize) & (newsize :silent! let &guifont = substitute( Let cursize = substitute(&guifont, s:pattern, '\2', '') Let fontname = substitute(&guifont, s:pattern, '\1', '')
#Mac increase font size on display 2 code#
To use this script, put the following code into ~/.vim/plugin/gtk2fontsize.vim or in your vimrc. Change minfontsize and maxfontsize to suit your needs. The following script defines two commands, :LargerFont and :SmallerFont, to allow quick adjustments to the font size used in the gtk2 gui. If you regularly switch to a larger or smaller font, for example because someone looking at your code thinks the letters are too small, or because you want to lay back in your chair while reading, this tip is for you.