How to "lock" ebook text?

The attached image is from an ebook. Let’s say I open the book in the Apple Books app or the Kindle iOS app. If I then select my preferred font (say, Times Roman), the text that I’ve flagged as “A” will change to Times Roman. But the text marked “B” will not. It just stays as it is. So somehow, the creator of the ebook was able to “lock” certain text so that the font style cannot be changed.

Within Scrivener, is it possible to do something similar? That is, create an ebook where the font style of certain text cannot be changed? If yes, how? (Please note that in the example below, I can use my finger to highlight individual words of the “B” text, so it is not the case that the “B” text is an inserted PNG image.)

Thank you.

The same question was asked a while back. As far as I can tell, you’d need to specify the font for those paragraphs in the ebook’s stylesheet.
Pick one that is common to all (or most) readers. Else, you’d need to embed that font. Which is a tad complicated, costs for rights (tho some fonts are free), and can’t be done from within Scrivener.
You’ll need Sigil or the likes. (Sigil is a free to use opensource software.)

Btw, I can tell from your screenshot that there is more than just a different font going on in your example. Some block formatting; with the vertical line on the left side. (I don’t know how to do that.)
If the book has no DRM, have a look at its stylesheet using Sigil.

Here is the other thread, perhaps you’ll find a more satisfying answer in there:

In the given example it seems quite possible that those two locked areas with their special blocking etc are in actuality just images. If your need for this sort of thing is similar, there is always the cheap and easy screenshot way.

Thank you both. Appreciate your feedback.

The <code> tag is used to define a piece of computer code. The content inside is displayed in the browser’s default monospace font.