fonts
Set Emacs defaut font face per-buffer/mode
How about something like this: (add-hook ‘markdown-mode-hook (lambda () (variable-pitch-mode t)) You can then customize the variable-pitch face, and the other faces in the buffer will inherit from this instead of the default face. Read the docs for buffer-face-mode for more customization details. (BufFace is also used for text-scale-increase and text-scale-decrease… very useful.)
How to control the font DPI in .NET WinForms app
Assuming you do not try to honor the user’s UI font choice (SystemFonts.IconTitleFont), and hard-code your forms for one font size only (e.g. Tahoma 8pt, Microsoft Sans Serif 8.25pt), you can set your form’s AutoScaleMode to ScaleMode.Dpi. This will scale the size of the form and most of it child controls by the factor CurrentDpiSetting … Read more
CSS – How can I make a font readable over any color?
While text-shadow is nice, it doesn’t actually give the result you want. A shadow is a shadow and what you need to have for most readable text is a “text border”. Unfortunately. there is no such thing as text-border in css, but we can make one ! I am surprised by how much unpopular multiple … Read more
Font-Weight CSS Transition in Chrome
The problem is that font weights, when represented numerically, must be a multiple of 100. To animate between 400 and 600, the font would change from 400 to 500 to 600 (3 ‘frames’, if you like) and wouldn’t look very smooth. An animation wouldn’t increment the weight by 1 each time (400, 401, 402…) it … Read more
What the difference between JetBrains Mono and JetBrains Mono NL
JetBrains Mono NL is the no-ligatures version of JetBrains Mono font. In some editors you may have difficulty disabling font ligatures (although some popular editors like Sublime Text, VS Code do have the option). If you don’t want font ligature, you can simply use the NL version.
font-weight is not working properly?
font-weight can fail to work if the font you are using does not have those weights in existence – you will often hit this when embedding custom fonts. In those cases the browser will likely round the number to the closest weight that it does have available. For example, if I embed the following font… … Read more
Convert from SwiftUI.Font to UIFont
A bit of a hack but works (doing the other direction is left as an exercise to the reader). extension UIFont { class func preferredFont(from font: Font) -> UIFont { let uiFont: UIFont switch font { case .largeTitle: uiFont = UIFont.preferredFont(forTextStyle: .largeTitle) case .title: uiFont = UIFont.preferredFont(forTextStyle: .title1) case .title2: uiFont = UIFont.preferredFont(forTextStyle: .title2) case … Read more