I using Helvetica Neue LT Std font in my iOS app. When i add a UIButton with Helvetica Neue LT Std (67 Medium Condensed). It cut a bit in top of words. Like this:
You can see it loss a bit at "S" and "G".
Have a try button.titleLabel?.adjustsFontSizeToFitWidth = true?
Related
I am using Linux Libertine as my font in my thesis and I love every character except for the italic uppercase J. However, the uppercase J in mathmode is nice and I would like to replace the italic J with the mathmode J. Is this possible? MWE:
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{libertine}
\usepackage[libertine]{newtxmath}
\begin{document}
I do not like the italic \textit{J}, I want $J$ for that.
\end{document}
Output:
MWE compiled
I know that mathmode J is produced by the newtxmath package, whereas the italic J is provided by the libertine package itself.
Thank you in advance.
I am trying to make the title CHAPTER 1 is aligned in the center and the title of the chapter is aligned to the left.
\titleformat{\chapter}[display]
{\large\bfseries}{\filcenter\chaptertitlename\ \thechapter}
{20pt}{\MakeUppercase{#1}}
\titlespacing*{\chapter}
{0pt}{0pt}{20pt} %controls vertical margins on title
But, then how can I change the font size? that is, for example, I need "CHAPTER 1" smaller than the title "Introduction".
You can change the font size by adding a command right before #1, like so:
\documentclass{book}
\usepackage[explicit]{titlesec}
\titleformat{\chapter}[display]
{\large\bfseries}{\filcenter\chaptertitlename\ \thechapter}
{20pt}{\Huge\MakeUppercase{#1}}
\titlespacing*{\chapter}
{0pt}{0pt}{20pt} %controls vertical margins on title
\usepackage{lipsum}
\begin{document}
\chapter{Introduction}
\lipsum[1]
\end{document}
I use
\titleformat{\section}{\normalfont\bfseries\color{blue}}{\thesection}{0.5em}{}
to set the section title heading as bold font, but i found the title scale is not look good, i would like to set scale =0.9 or smaller only on title heading, how could i do that? my latex engine is xelatex. thanks for the help.
MWE:
\documentclass[10pt,a4paper,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{titlesec}
\titleformat{\part}{\normalfont\bfseries\color{black}}{\makebox[2em] {\thepart}}{0.5em}{}
\titleformat{\chapter}{\normalfont\bfseries\color{red}}{\thechapter}{0.5em}{}
\usepackage{graphicx}
\begin{document}
This line is Latin Modern font\\
This line is Latin Modern font\\
\bfseries{This line is Latin Modern font bold}
\end{document}
I am using Inkscape to convert images to Latex, so the text scales nicely. Using SaveAs pdf, with generate Latex ticked.
This creates a .pdf_tex file that contains something like this:
\begingroup%
\begin{picture}(1,1.18884212)%
\put(0,0){\includegraphics[width=\unitlength,page=1]{Scapula.pdf}}%
\put(0.6981335,0.82053681){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{Infraspinous fossa}}}%
\end{picture}%
\endgroup%
I would like to change the font size and possible also the font, so the text in all images is different from the body text. I think this is possible by e.g. redefining \smash within "picture", but I don't know how. Is this the correct approach? If so, any tips on how to do it?
With the etoolbox you could add the fontsize change to the picture environment:
\documentclass{article}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{etoolbox}
\AtBeginEnvironment{picture}{\huge}
\begin{document}
\begingroup%
\begin{picture}(1,1.18884212)%
\put(0,0){\includegraphics[width=\unitlength,page=1]{example-image.pdf}}%
\put(0.6981335,0.82053681){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{Infraspinous fossa}}}%
\end{picture}%
\endgroup%
\end{document}
I'm trying to set a font programmatically. I want to use System Semibold like I'm using in the interface builder. Been looking for it on the list of fonts. Do I need to use
[myButton.titleLabel setFont:[UIFont fontWithName:#"Helvetica-Semibold" size:13.0]]
?
The system font for iOS, starting in iOS 9, is "San Fransisco." To get a semibold version, you could use something along the lines of:
Swift 2.2:
UIFont.systemFontOfSize(20, weight: UIFontWeightSemibold)
Swift 3.0:
UIFont.systemFont(ofSize: 20, weight: UIFontWeightSemibold)
Swift 4.0:
UIFont.systemFont(ofSize: 20, weight: .semibold)
For more information on this, see the UIFont Class Reference.
To further assist you these are the official names of all the helvetica fonts that apple currently supports as taken directly from the Apple website:
https://support.apple.com/en-us/HT202771
Helvetica
Helvetica Bold
Helvetica Bold Oblique
Helvetica Light
Helvetica Light Oblique
Helvetica Neue
Helvetica Neue Bold
Helvetica Neue Bold Italic
Helvetica Neue Condensed Black
Helvetica Neue Condensed Bold
Helvetica Neue Italic
Helvetica Neue Light
Helvetica Neue Light Italic
Helvetica Neue Medium
Helvetica Neue Medium Italic
Helvetica Neue Thin
Helvetica Neue Thin Italic
Helvetica Neue UltraLight
Helvetica Neue UltraLight Italic
Helvetica Oblique