wustho / epy

CLI Ebook (epub2, epub3, fb2, mobi) Reader
GNU General Public License v3.0
962 stars 52 forks source link

Inline bold text not bold #27

Closed SlidingHorn closed 3 years ago

SlidingHorn commented 3 years ago

So I'm positive that my terminal emulator and the font I'm using are capable of bold text, however, it does not appear that it's working in the book I'm reading: Screenshot_2021-07-14_21-16-12

The headings show as bold, but text in the content body that's supposed to be bold is not showing as such. Is there something I'm missing?

Here's the source from that section if it helps:

<p>It’s not immediately clear how the prefix and mask work together to give you all possible IP addresses on a subnet. Looking at the numbers in binary form helps clear it up. The mask marks the bit locations in an IP address that are common to the subnet. For example, here are the binary forms of 10.23.2.0 and 255.255.255.0:</p>

<a id="pro_id00249"/><pre class="programlisting">10.23.2.0:        00001010 00010111 00000010 00000000
            255.255.255.0:    11111111 11111111 11111111 00000000</pre>

<p>Now, let’s use boldface to mark the bit locations in 10.23.2.0 that are 1s in 255.255.255.0:</p>

<a id="pro_id00250"/><pre class="programlisting">10.23.2.0:        <span class="strong"><strong>00001010 00010111 00000010</strong></span> 00000000</pre>

<p>Look at the bits that are <span class="emphasis"><em>not</em></span> in bold. You can set any number of these bits to 1 to get a valid IP address in this subnet, with the exception of all 0s or all 1s.</p>

<p>Putting it all together, you can see how a host with an IP address of 10.23.2.1 and a subnet mask of 255.255.255.0 is on the same subnet as any other computers that have IP addresses beginning with 10.23.2. You can denote this entire subnet as 10.23.2.0/255.255.255.0.</p>
</div>

<div class="sect2" title="9.3.3 Common Subnet Masks and CIDR Notation"><div class="titlepage"><div><div><h2 class="title"><a id="ninedot3dot3_common_subnet_masks_and_cid"/>9.3.3 Common Subnet Masks and CIDR Notation</h2></div>

EDIT: The epub does have some embedded fonts - both of which support bold text as well - however, those are overridden by whatever font is chosen by the terminal. I've also attempted to change my terminal font to those fonts (DejaVu and Ubuntu Mono), and there was no change

wustho commented 3 years ago

Ahhh, It's simply overlooked tags, so, in epy code line 425:

bold = {"b"}

We should also have "strong" in there so it becomes bold = {"b", "strong"}... Will fix this the next commit, thanks for pointing out & attaching the source HTML...

wustho commented 3 years ago

@SlidingHorn Hello there, just updated epy with https://github.com/wustho/epy/commit/f0a5af77208d0e551976fe7e15ee9945cc9df4f4

You might want to upgrade it and see if it works now...

SlidingHorn commented 3 years ago

Looks like it works!

Thanks for the quick turnaround