<p dir="auto">How to reproduce:</p>
<ol dir="auto">
<li>Have user stylesheet with custom editor font set</li>
<li>Start new editor, previously opened buffers are restored</li>
<li>Cursor and selection position does not match rendered text</li>
</ol>
<p dir="auto">Way to fix:</p>
<ol dir="auto">
<li>When I re-open same buffer again, it works OK.</li>
</ol>
<hr>
<p dir="auto">I am using Atom <code class="notranslate">v0.196.0</code> on GNU Operating System</p>
<p dir="auto">Possibly related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="39772520" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/3201" data-hovercard-type="issue" data-hovercard-url="/atom/atom/issues/3201/hovercard" href="https://github.com/atom/atom/issues/3201">#3201</a>, if you have fonts loaded through <code class="notranslate">@font-face</code> (e.g. using my fonts package), a reload causes the cursor/selection alignment to misbehave. Switching to the default font (i.e. empty the font family box in settings) restores it. You can then switch back to an <code class="notranslate">@font-face</code> font and it will work properly again.</p>
<p dir="auto">Steps to reproduce:</p>
<ul dir="auto">
<li>Use an <code class="notranslate">@font-face</code> font as outlined here: <a href="https://discuss.atom.io/t/how-do-i-load-google-fonts-into-my-editors-styles/8321/7" rel="nofollow">https://discuss.atom.io/t/how-do-i-load-google-fonts-into-my-editors-styles/8321/7</a> (or by using <a href="http://atom.io/packages/fonts" rel="nofollow">http://atom.io/packages/fonts</a>).</li>
<li>Put the name of the font in settings (e.g. 'aka-coder').</li>
<li>Open a file in Atom: all should look well in the new font.</li>
<li>Choose View &gt; Reload.</li>
<li>Cursor and selection should now misalign. You can check this by double-click-selecting a word or by typing a row of characters.</li>
<li>Switch to settings.</li>
<li>Empty the font-family setting.</li>
<li>Switch to the file and all should look well again in the default font.</li>
<li>Switch to settings.</li>
<li>Put the name of the font in settings (e.g. 'aka-coder').</li>
<li>Switch to the file and all should look well again in aka-coder.</li>
</ul>