Great work. It looks as the space in "No. 12" is too large. Is it possible to distinguish between space and sentence-end-space?
The solution here is to fix the sample text itself to use U+202F (NARROW NO-BREAK SPACE,  ). As opposed to the standard width no-break space it currently has for "No. 12" and "Fig. 7".
The actual approach used by a printer would be to be more generous with spacing material at the end of a sentence.
The relevant TeX commands are \frenchspacing or \nofrenchspacing.