How do you load and use a custom font in Svelte

If you are using Sveltekit, you can load fonts locally using the static directory. Store your font files under static/fonts, and then use either a CSS file or a <style> tag to reference your font files. /* fonts.css */ @font-face { font-family: ‘Lora’; font-style: normal; font-weight: 500; src: url(‘/fonts/lora-v20-latin-500.eot’); /* IE9 Compat Modes */ src: … Read more

Set the Navigation Bar Title Font

In SwiftUI, at this point we can not change the navigationBarTitle font directly, but you can change navigationBar appearance like this, struct YourView: View { init() { //Use this if NavigationBarTitle is with Large Font UINavigationBar.appearance().largeTitleTextAttributes = [.font : UIFont(name: “Georgia-Bold”, size: 20)!] //Use this if NavigationBarTitle is with displayMode = .inline //UINavigationBar.appearance().titleTextAttributes = [.font … Read more

how to set the bold font style in Plotly

If you are using Python you can add the <b> html tag to the title attribute and you are good. You can add some more limited HTML styling such as italic as well, see example below. import plotly plotly.offline.init_notebook_mode() data = [plotly.graph_objs.Bar( x=[‘giraffes’, ‘orangutans’, ‘monkeys’], y=[20, 14, 23] )] layout = go.Layout(title=”<b>Bold</b> <i>animals</i>”) fig = … Read more

What is the ideal font for OCR?

After trying a lot of different fonts and OCR engines I tend to get the best results using Consolas. It is a monospaced typeface like OCR-A, but easier to read for humans. Consolas is included in several Microsoft products. There is also an open source font Inconsolata, which is influenced by Consolas. Inconsolata is a … Read more

Downsizing an .OTF font by removing glyphs

I’ve written a Python2 script with fontforge library does the following: Accepts a source font Accepts a file containing all characters to be used. It can be a translation file, string asset file, HTML file, etc. Output a font with characters that aren’t shown in the file removed Here is the code: #!/usr/bin/python2 import sys … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)