# How to mix fonts in a way that doesn't change line spacing?

I'm trying to use Pages to write a technical document. The text has mix of normal font and a fixed width font (aka "monospaced") to represent computer code. For example:

The problem is that when there are multiple lines I can see that the fixed width font pushes the line height out and makes the text look bad. It does this even though both the fonts are the same point size. It even does it when I reduce the fixed width font size a little. Here is a larger screenshot to show what I mean.

Some fonts are worse than others. Courier for example, moves the line, but barely. I don't like the looks of it though – its letters appear significantly shorter than the surrounding Helvetica. I like the Fira Code font, but it moves the line a lot. I had to shrink the Fira Code all the way to 7pt before it stopped disrupting the line spacing.

Shouldn't fonts with same point size have the same line height? If not, is there some way to choose fonts that do? Is there a certain kind of font, or property of the font, that I should be looking for?

• Have you tried selecting the text and setting the line spacing to 1.2 or something like that in Pages? Jun 28, 2020 at 21:47
• Yes, I played with that. I don't like the results. The lines stay unequally spaced as they spread apart. Jun 28, 2020 at 23:53
• ok, sorry it didn't help. Jun 29, 2020 at 0:59