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.)

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