How to import a new font into a project – Angular 5

You need to put the font files in assets folder (may be a fonts sub-folder within assets) and refer to it in the styles: @font-face { font-family: lato; src: url(assets/font/Lato.otf) format(“opentype”); } Once done, you can apply this font any where like: * { box-sizing: border-box; margin: 0; padding: 0; font-family: ‘lato’, ‘arial’, sans-serif; } … Read more

Custom fonts in iOS 7

First of all I’m assuming that SpriteKit doesn’t make any difference. You need your font in .otf or .ttf copied to your project. For example in Supporting Files. You need to edit .plist file. Add “Fonts provided by application” key into your plist and in Item 0 copy the exact filename of the font you … Read more

Why does Twitter Bootstrap Use Pixels for Font Size?

Well it seems that they are hiding behind the browser zoom excuse. Really sad to see such a heavily used and influential framework completely ignore accessibility issues and a fundamental cornerstone of responsive design. They are in a position of great responsibility and unfortunately seem to have no intention of acting accordingly. [Update] So today … Read more

Transparent text cut out of background

It’s possible with css3 but it’s not supported in all browsers With background-clip: text; you can use a background for the text, but you will have to align it with the background of the page body { background: url(http://www.color-hex.com/palettes/26323.png) repeat; margin:10px; } h1 { background-color:#fff; overflow:hidden; display:inline-block; padding:10px; font-weight:bold; font-family:arial; color:transparent; font-size:200px; } span { … Read more

How to vertically align text with icon font?

In this scenario, since you are working with inline-level elements, you could add vertical-align: middle to the span elements for vertical centering: .nav-text { vertical-align: middle; } Alternatively, you could set the display of the parent element to flex and set align-items to center for vertical centering: .menu { display: flex; align-items: center; }

How do I set the default font size in Vim?

For the first one remove the spaces. Whitespace matters for the set command. set guifont=Monaco:h20 For the second one it should be (the h specifies the height) set guifont=Monospace:h20 My recommendation for setting the font is to do (if your version supports it) set guifont=* This will pop up a menu that allows you to … Read more

Get font face under cursor in Emacs

what-cursor-position with a prefix argument shows the face under point, among other information. Keyboard shortcut is C-u C-x = Example output (the face property is shown in the last paragraph): position: 5356 of 25376 (21%), column: 4 character: r (displayed as r) (codepoint 114, #o162, #x72) preferred charset: ascii (ASCII (ISO646 IRV)) code point in … Read more

iOS change navigation bar title font and color

The correct way to change the title font (and color) is: [self.navigationController.navigationBar setTitleTextAttributes: @{NSForegroundColorAttributeName:[UIColor redColor], NSFontAttributeName:[UIFont fontWithName:@”mplus-1c-regular” size:21]}]; Edit: Swift 4.2 self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.red, NSAttributedString.Key.font: UIFont(name: “mplus-1c-regular”, size: 21)!] Edit: Swift 4 self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.red, NSAttributedStringKey.font: UIFont(name: “mplus-1c-regular”, size: 21)!] Swift 3: self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.redColor(), NSFontAttributeName: UIFont(name: “mplus-1c-regular”, size: 21)!] Swift 5: … Read more

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