1

I have been experimenting with some ways to create finer control for font-weight using CSS. We have the following OS/Device requirements running in IE, Edge, Chrome, Safari, Opera, and Firefox. Only require modern browsers, no old stuff.

OS Support/Device Requirement

Modern Browsers: Windows, MAC, iOS, Android, Linux for PCs/Laptops Mobile Devices: iPhone 4+, Samsung S2+, iPad tablets, Samsung tablets, Windows tablets

Summary

I have included a working example with three different test cases. The first test case is too blurry, especially in IE/Edge. It is less blurry on some OS/Devices/browsers, but not uniform enough for our needs. It uses text-shadow: 1px 1px #999; to set boldness.

The second test case is most uniform in appearance on all devices/OS/browsers, but it exhibits some blurriness. It uses text-shadow: 1px 0.1px rgba(0, 0, 0, 0.35); to achieve finer resolution of boldness.

The third test case is too bold for our use cases. It uses color: #000;font-weight: 600; to set boldness. I have tried lighter color, but you are still left with thicker characters, which we do not want.

Does anyone know of a better way to attack this issue?

Update

I have selected the answer that pointed me to a font style that had the desired half-tone font weight, which is the better way that I had asked for in my original question.

My original question did not adequately state my two primary objectives, which I have now added here.

Desired Functionality:

  1. An Arial like font weight that was in between those found in the web safe Arial fonts.
  2. A way to highlight some text without increasing the normal text spacing and without using different colors.

Number 1 above was addressed by the answers to this question. By switching to a Google font that is similar to Arial, the desired half-tone was achieved. In addition, our user's feedback on the new base font was all positive. Clearer, easier to read, not so scrunched, etc. The ~17K download was well worth it.

The comments to the original question are correct. Text-shadow functionality cannot be used to create a font-weight using CSS. Why?

  1. Font-weight is typically used to create a set of scalable fonts that have increasing font thickness with increasing font-weight numbers, i.e., 500, 600, 700, etc. The keyword is scalable. Font-weight 500 and 600 maintain their aspect ratio as the font size is increased.

The following image illustrates the scalable nature of font-weights.

enter image description here

  1. Text-shadow adds a fixed text effect to a given font. As the font size is increased, the shadow effect is diminished. E.g., A subtle text effect for a 16px text font can be invisible to the naked eye for a font size of 50px or 70px. The key takeaway here is that the text-shadow does not scale linearly as font size is increased.

The following image illustrates the fixed nature of box shadow and text-shadow in CSS. The smallest box is dwarfed by its shadow, whereas the shadow effect on the largest box is small relative to the element size.

enter image description here

I am going to add another answer to this question that attempts to address my updated requirements and include details for my specific solution.

I appreciate the help and feedback from all.

body {
  padding: 0;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: normal;
  font-size: 15px;
  font-style: normal;
  font-variant: normal;
  text-transform: none;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #383838;
  width: 100%;
  height: 100%;
  -webkit-text-size-adjust: none !important;
  -ms-text-size-adjust: none !important;
  -moz-text-size-adjust: none !important;
  border: none;
  text-align: center;
  text-rendering: optimizelegibility;
  min-width: 300px !important;
}

h3,
h4,
h5,
h6 {
  display: block;
  font-family: inherit;
  line-height: 1.1;
  color: #000;
  opacity: 1.0;
  font-weight: normal;
  text-align: center;
  margin: 10px auto 6px auto;
  font-size: 1em;
}

h3 {
  font-size: 1.05em;
}

h4 {
  font-size: 1.1em;
}

h5 {}

h6 {
  margin: .25em auto;
}

.center-block {
  display: block;
  width: auto;
  text-align: center;
  margin-right: auto;
  margin-left: auto;
}

.test-boldness {
  text-shadow: 1px 0.1px rgba(0, 0, 0, 0.23);
}

.bold {
  font-weight: 500;
  color: #000;
}

.bolder {
  font-weight: 500;
  color: #000;
  text-shadow: 1px 0.1px rgba(0, 0, 0, 0.35);
}

.boldest {
  color: #000;
  font-weight: 600;
}

.test-boldness {
  text-shadow: 1px 0.1px rgba(0, 0, 0, 0.35);
}

.test-boldness-1pxsolid {
  text-shadow: 1px 1px #999;
}

div {
  font-family: inherit;
  color: #383838;
}
<!DOCTYPE html>

<head></head>
<html>

<body>
  <br />
  <br />
  <div class="center-block"><span class="test-boldness-1pxsolid">How Used: </span>Visible accent. This one has most blurring on all required OS/devices.</div>
  <br />
  <div>
    <span style='font-weight: 300'>300</span>
    <span style='font-weight: 400'>400</span>
    <span style='font-weight: 500'>500</span>
    <span class='test-boldness'>Custom 550</span>
    <span style='font-weight: 600'>600</span>
    <span style='font-weight: 700'>700</span>
    <br />
    <br />
    <div class="center-block"><span class="test-boldness">How Used: </span>Visible accent. Less blurring/most uniform on required OS/devices. Is there a better way to do this?</div>
    <br />
    <br />
    <div class="center-block"><span class="boldest">How Used: </span>Visible accent. This one is clearest but too bold, especially on some of the required OS/devices.</div>
    <br />
    <h3>Test Cases</h3>
    <br />
    <h3 class="test-boldness-1pxsolid">TEST ABCDKTM test abcdktm-1pxsolid</h3>
    <h3 class="test-boldness">TEST ABCDKTM test abcdktm 0.1px Op LT 1</h3>
    <h3>TEST ABCDKTM test abcdktm</h3>
    <h4 class="test-boldness-1pxsolid">TEST ABCDKTM test abcdktm-1pxsolid</h4>
    <h4 class="test-boldness">TEST ABCDKTM test abcdktm 0.1px Op LT 1</h4>
    <h4>TEST ABCDKTM test abcdktm</h4>
    <h5 class="test-boldness-1pxsolid">TEST ABCDKTM test abcdktm-1pxsolid</h5>
    <h5 class="test-boldness">TEST ABCDKTM test abcdktm 0.1px Op LT 1</h5>
    <h5>TEST ABCDKTM test abcdktm</h5>
    <h6 class="test-boldness-1pxsolid">TEST ABCDKTM test abcdktm-1pxsolid</h6>
    <h6 class="test-boldness">TEST ABCDKTM test abcdktm 0.1px Op LT 1</h6>
    <h6>TEST ABCDKTM test abcdktm</h6>
    <div class="center-block bold test-boldness">TEST ABCDKTM test abcdktm 0.1px Op LT 1</div>
    <div class="center-block bold">TEST ABCDKTM test abcdktm</div>
    <div class="center-block bolder test-boldness">TEST ABCDKTM test abcdktm font-weight: 500</div>
    <div class="center-block bolder">TEST ABCDKTM test abcdktm font-weight: 500</div>
    <div class="center-block boldest">TEST ABCDKTM test abcdktm font-weight: 600</div>
    <div class="center-block boldest">TEST ABCDKTM test abcdktm font-weight: 600</div>

</body>

</html>
Highdown
  • 646
  • 1
  • 11
  • 23
  • 3
    The web is not print media. You don’t get the same fine level of control. If your browser/font doesn’t support different font weights, then there’s nothing more to do. – Cody Gray - on strike Mar 04 '19 at 21:24
  • @Cody Thank you for taking the time to respond. I am aware of the differences between Windows Apps vs. Web Apps. I also do a lot of C, C++, C# development. Web browser font-weights out-of-the-box won't do it. However, I believe a statement that you made is technically inaccurate about there’s nothing more to do if a browser doesn’t support different font weights. See my updated code, 300 400 500 Custom (see case 2) 600 700. This does bridge the gap between FW 500 and 600. My question is not if something can be done, it can. The question is: how to do it better (less blurry). Thanks again. – Highdown Mar 05 '19 at 00:42
  • Simulating boldness by adding a shadow is an anti-pattern. Aside from the fact that it is extremely blurry (and inevitably will be, given how you're implementing it), it does not convey the same semantics as "bold". You would be better served by looking for a font that implements the weights you desire, and then using that font on your site instead of one of the standard (limited) Web-safe fonts. – Cody Gray - on strike Mar 05 '19 at 00:46
  • You’re probably struggling with the fact that most browsers don’t anti-alias the same as a design program, so your font weights are not quite what you were hoping for (browsers render chunkier is how I’d describe it). Check out this article. I’ll bet if you anti-alias, you can get the weight you’re hoping for (the weight you see in your graphic design program). https://devhints.io/css-antialias – Nate Mar 05 '19 at 03:02
  • @Cody Gray Any specific reason you aren't considering importing the relevant `font-family`'s to solve the issue? – Rob Monhemius Mar 05 '19 at 03:08
  • By the way, if you’re wanting a “550” weight, then you probably want an anti-aliased 600. That’s the closest you’ll reasonably get anyways. A font only has so many weights to it. Some fonts include more weights. Some don’t. So you’ll want to pick a font that actually supports granularity as well. Ones that don’t just end up using the same weight for multiple levels. – Nate Mar 05 '19 at 03:11
  • I was very strongly hinting at it, @RMo. – Cody Gray - on strike Mar 05 '19 at 03:24

4 Answers4

1

CSS provides a much wider variety of font-weight values than you think. Mozilla's CSS font-weight page even lists weight values that I didn't know about. shock! Values range from 1-1000, typically increasing at intervals of 100, with a couple of deviations. It might not be a perfect solution, but you might find some options you didn't realize that you had.

elbrant
  • 763
  • 5
  • 16
  • i appreciate your feedback. The font family must be Arial, Helvetica, sans-serif or visual equivalent. If I can find that, I will use it. The problem is that I have not found an off-the-shelf solution yet. The difficulty is that some of the older iOS phones, 4+, haven't had an OS or browser update in years. I am still investigating a number of options, including those from RMo. I have some more Font families to download and test, but as you can imagine, its a lot of work considering all the devices and OS and browser variants to verify. Thanks again – Highdown Mar 06 '19 at 00:32
  • Helvetica doesn't seem to be an online option any longer. The only users who would be able to see it rendered on your page are those who, like me, own it. Give [Google Fonts Roboto](https://fonts.google.com/specimen/Roboto?selection.family=Roboto) a look and see if that might meet your requirements. – elbrant Mar 06 '19 at 01:24
  • 1
    Appreciate the link. I evaluated the Roboto font and it is very similar (almost identical) to our baseline font. However, it does not really improve the font-weight resolution. At the Google site, I found 'Open Sans', which is a close enough match to our baseline. It does have a half-tone font weight that is not too bold. I am still running more tests to evaluate. Thanks again for your assistance. – Highdown Mar 06 '19 at 22:54
1

What is happining

The way fonts works now is that a font has various font-weights it can use. To use a font weight they need to be available in your users browser. Browsers usually do not have the fonts installed to support the 9 typical font-weights( 100, 200, 300, 400, 500, 600, 700, 800, 900 ). It will round up or down to the nearest one available.

What you can do about it

You could try to find a font that supports all the font-weights you want and import it. I found some on google fonts: https://fonts.google.com/?stylecount=18.

Modified code

All I changed was importing 'Montserrat' to your code and assigning the Montserrat font to your body.

@import url('https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800,900');

body {
  padding: 0;
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: normal;
  font-size: 15px;
  font-style: normal;
  font-variant: normal;
  text-transform: none;
  font-synthesis: none;
  color: #383838;
  width: 100%;
  height: 100%;
  -webkit-text-size-adjust: none !important;
  -ms-text-size-adjust: none !important;
  -moz-text-size-adjust: none !important;
  border: none;
  text-align: center;
  text-rendering: optimizelegibility;
  min-width: 300px !important;
}

h3,
h4,
h5,
h6 {
  display: block;
  font-family: inherit;
  line-height: 1.1;
  color: #000;
  opacity: 1.0;
  font-weight: normal;
  text-align: center;
  margin: 10px auto 6px auto;
  font-size: 1em;
}

h3 {
  font-size: 1.05em;
}

h4 {
  font-size: 1.1em;
}

h5 {}

h6 {
  margin: .25em auto;
}

.center-block {
  display: block;
  width: auto;
  text-align: center;
  margin-right: auto;
  margin-left: auto;
}

.test-boldness {
  text-shadow: 1px 0.1px rgba(0, 0, 0, 0.23);
}

.bold {
  font-weight: 500;
  color: #000;
}

.bolder {
  font-weight: 500;
  color: #000;
  text-shadow: 1px 0.1px rgba(0, 0, 0, 0.35);
}

.boldest {
  color: #000;
  font-weight: 600;
}

.test-boldness {
  text-shadow: 1px 0.1px rgba(0, 0, 0, 0.35);
}

.test-boldness-1pxsolid {
  text-shadow: 1px 1px #999;
}

div {
  font-family: inherit;
  color: #383838;
}
<!DOCTYPE html>

<head></head>
<html>

<body>
  <br />
  <br />
  <div class="center-block"><span class="test-boldness-1pxsolid">How Used: </span>Visible accent. This one has most blurring on all required OS/devices.</div>
  <br />
  <div>
    <span style='font-weight: 300'>300</span>
    <span style='font-weight: 400'>400</span>
    <span style='font-weight: 500'>500</span>
    <span class='test-boldness'>Custom 550</span>
    <span style='font-weight: 600'>600</span>
    <span style='font-weight: 700'>700</span>
    <br />
    <br />
    <div class="center-block"><span class="test-boldness">How Used: </span>Visible accent. Less blurring/most uniform on required OS/devices. Is there a better way to do this?</div>
    <br />
    <br />
    <div class="center-block"><span class="boldest">How Used: </span>Visible accent. This one is clearest but too bold, especially on some of the required OS/devices.</div>
    <br />
    <h3>Test Cases</h3>
    <br />
    <h3 class="test-boldness-1pxsolid">TEST ABCDKTM test abcdktm-1pxsolid</h3>
    <h3 class="test-boldness">TEST ABCDKTM test abcdktm 0.1px Op LT 1</h3>
    <h3>TEST ABCDKTM test abcdktm</h3>
    <h4 class="test-boldness-1pxsolid">TEST ABCDKTM test abcdktm-1pxsolid</h4>
    <h4 class="test-boldness">TEST ABCDKTM test abcdktm 0.1px Op LT 1</h4>
    <h4>TEST ABCDKTM test abcdktm</h4>
    <h5 class="test-boldness-1pxsolid">TEST ABCDKTM test abcdktm-1pxsolid</h5>
    <h5 class="test-boldness">TEST ABCDKTM test abcdktm 0.1px Op LT 1</h5>
    <h5>TEST ABCDKTM test abcdktm</h5>
    <h6 class="test-boldness-1pxsolid">TEST ABCDKTM test abcdktm-1pxsolid</h6>
    <h6 class="test-boldness">TEST ABCDKTM test abcdktm 0.1px Op LT 1</h6>
    <h6>TEST ABCDKTM test abcdktm</h6>
    <div class="center-block bold test-boldness">TEST ABCDKTM test abcdktm 0.1px Op LT 1</div>
    <div class="center-block bold">TEST ABCDKTM test abcdktm</div>
    <div class="center-block bolder test-boldness">TEST ABCDKTM test abcdktm font-weight: 500</div>
    <div class="center-block bolder">TEST ABCDKTM test abcdktm font-weight: 500</div>
    <div class="center-block boldest">TEST ABCDKTM test abcdktm font-weight: 600</div>
    <div class="center-block boldest">TEST ABCDKTM test abcdktm font-weight: 600</div>

</body>

</html>

Extra reading

  1. https://www.quirksmode.org/css/text/fontweight.html
  2. https://drafts.csswg.org/css-fonts-4/#missing-weights
Rob Monhemius
  • 4,822
  • 2
  • 17
  • 49
  • Thanks for taking the time to respond constructively. I read the information from your links. I was already familiar with most of the info. I am doing another sweep to look at font downloads, but in the past have not found an Arial, Helvetica, sans-serif set of fonts that worked (behaved the same with acceptable boldness) on all devices, OS, and browsers. I did try the fonts used in the first link, and the same settings behave differently. IE, Edge, and Firefox were the same, but differed from Chrome and Opera. I have a lot more testing to do, but will post the results. Thanks again. – Highdown Mar 06 '19 at 00:47
  • @ RMo I selected your answer to my original question because you a) illustrated an intermediate font-weight using a Google downloadable font, and b) you also pointed me to the Google location where I eventually found an acceptable alternative font. elbrant's answer was also very helpful, but I can only check one. I revised my original question to more clearly define our needs and have posted an additional answer to hopefully help those that find their way to this link. – Highdown Mar 12 '19 at 19:11
0

My answer to our expanded requirements

I wanted to document our approach for others that are trying to deal with one or both of the issues that I noted in the original question.

As others have already pointed out, you cannot achieve intermediate font-weights using CSS text-shadow. If you tried to emulate font-weights with JavaScript and CSS (really bad idea), it would be convolutedly complex and you would never achieve the good cross-platform uniformity that the font-weight functionality provides.

Side Note: Notice the Stack Overflow font bolding of the word JavaScript. The font-width and height is noticeably bigger in Firefox, which is what I am using now. This is a normal side effect of changing font-weight for inline text.

Problem 1. Missing Font Weight (less bold increments)

The following illustrates one of two problems we have been trying to solve. The first example uses web safe fonts. The second uses Open-Sans to achieve the desired half-tone font-weight. This solved our first problem. No, I am not shouting. There's just no way to add a subtle text effect on SO, and none is required. Here is a good link with font images. This document lead me to make the choice of the Open Sans font.

The first bold font is the only choice with the web safe font that we were using. The second is the Open Sans font that we downloaded from Google. The pasted images do not do either font justice. If you run the code snippet, you will see what it really looks like.

enter image description here

From the above, you can observe how the bolder font-weight affects the text using the web safe Arial font-family. The Open Sans font is more like what we were looking for. However, if you want to add inline emphasis to a word or set of words, the switch between the 500 and 600 font-weight causes a noticeable increase in font height and thickening of the font. This, in MHO, is not the best solution from an aesthetic perspective.

Problem 2. Subtle Text Accents (less bold than next font-weight that do not change text width or height)

First, compare the more subtle versions (below) of the above two tables using text-shadowing effects.

If you run the snippet and use the + key to zoom in one or two levels, the text accent is still discernible.

The tables below are a little smaller because the text shadowing does not affect the element width or height (see W3.org note below). Text-shadows can infringe on neighboring characters, which can be bad or good, depending on the designers intent. BTW, our users picked the second set of highlighted table fonts 100% of the time. They said they looked clearer, cleaner, sharper, not so thick, etc.

enter image description here

From W3.org:

  • Unlike box-shadow, text shadows are not clipped to the shadowed shape and may show through if the text is partially-transparent.
  • Like box-shadow, text shadows do not influence layout, and do not trigger scrolling or increase the size of the scrollable area.

Have a look at the paragraph below. It is included in the code snippet. It is pretty easy to pick out one set of highlighted words that are thicker and a little higher than adjacent text. If you run the snippet, you'll notice the fonts are clearer than the reproduced image below. Our users vastly preferred the more subtle text highlighting for inline text and tables.

enter image description here

We have always used a darker text color for words that we wanted to accent. For larger fonts, our users said that it was 'adequate', but 'not great'. Their complaint was that the color difference was not really visible for smaller font sizes.

The problem is that black #000 fonts turn into shades of lighter grays (see next figure below) as the font size is made smaller, which is a font-rendering issue that we cannot change. This is our second issue.

We were able to address this, to our satisfaction, when we added a small/horizontal sub-pixel text shadow. We were able to achieve a comparatively clear, bolder looking text accent that can be observed even as the font size is increased (say 14px to 28px). Our users were stoked, to say the least, with the visual improvements of the new font and text shadow highlighting effects.

You can judge for yourself by running the example on different OS, devices, and browsers. We did just that with our users. We let them determine their preference with side-by-side comparisons of devices (mobile/PC) on the same and different operating systems.

Caveats

  • Text shadowing requires some experimentation. Text-weights just work.
  • All browsers, OSs, and hardware text rendering are not created. Expect variability.
  • Expect the text highlighting effect to diminish when the font size is increases.
  • If you can use the darkest color hue for the text accents, the difference in color hues can still be seen at much larger fonts, which provide a path to graceful degradation.

The following 12 lines of text are divided into two groups.

enter image description here

The first group of 6 lines reflect the default Open Sans 600 font in the left column and accented text applied to the 600 font weight in the right column.

The second group of 6 lines reflect the default Open Sans 500 font in the left column and accented text applied to the 500 font weight in the right column.

Again, if you run the code snippet, you'll see better quality results over the copy/paste.

The Stack Overflow question, here, also addresses our second issue. The solution is the simplest one I have found, but it gives blurry result at more than ~0.3px for text-shadow: 0 0 0.3px;

<div>Testing 123: </div>
<div style="text-shadow: 0 0 .2px">Testing 123: </div>
<div style="text-shadow: 0 0 .4px">Testing 123: </div>
<div style="text-shadow: 0 0 .6px">Testing 123: </div>
<div style="text-shadow: 0 0 .8px">Testing 123: </div>
<div style="text-shadow: 0 0 1px">Testing 123: </div>

@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600');
body {
  padding: 0;
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  font-weight: normal;
  font-size: 15px;
  font-style: normal;
  font-variant: normal;
  text-transform: none;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #383838;
  width: 100%;
  height: 100%;
  -webkit-text-size-adjust: none !important;
  -ms-text-size-adjust: none !important;
  -moz-text-size-adjust: none !important;
  border: none;
  text-align: center;
  text-rendering: optimizelegibility;
  min-width: 300px !important;
}

h3,
h4,
h5,
h6 {
  display: block;
  font-family: inherit;
  color: rgba(0, 0, 0, .83);
  text-align: center;
  margin: 10px auto 6px auto;
  font-size: 1em;
  font-weight: 500;
}

h3 {
  font-weight: 500;
  font-size: 1em;
  color: rgba(0, 0, 0, 0.9);
  text-shadow: 0.45px 0 0 rgba(0, 0, 0, 0.9);
}

h4 {
  color: rgba(0, 0, 0, 0.9);
  text-shadow: 0.1px 0 0 rgba(0, 0, 0, 0.9);
  text-shadow: 0.3px 0 0 rgba(0, 0, 0, 0.9);
  font-size: 1em;
}

h5,
.darker-font {
  color: rgba(0, 0, 0, 0.9);
  text-shadow: 0.08px 0 0 rgba(0, 0, 0, 0.9);
  font-size: 1em;
}

.center-block {
  display: block;
  width: auto;
  text-align: center;
  margin-right: auto;
  margin-left: auto;
}

.margintb-8 {
  margin-top: 8px;
  margin-bottom: 8px;
}

.column0,
.column1,
.column2,
.column3,
.column-w {
  display: table-column;
  width: auto;
  align-content: center;
}

.table-r {
  display: table;
  border: 1px solid #606060;
  margin: auto;
  align-content: center;
  background: #fff;
}

.row-r {
  display: table-row;
}

.cell-r-center,
.cell-r-left,
.cell-r-right,
.cell-r-center-border,
.cell-r-left-border,
.cell-r-right-border {
  display: table-cell;
  text-align: center;
  padding: 4px;
  white-space: nowrap;
}

.cell-r-left,
.cell-r-left-border {
  text-align: left;
}

.cell-r-right,
.cell-r-right-border {
  text-align: right;
}

.cell-r-center-border,
.cell-r-left-border,
.cell-r-right-border {
  border-top: 1px solid #606060;
}

div {
  font-family: inherit;
  color: #333;
  text-align: left;
}

.inline-block {
  vertical-align: middle;
  display: inline-block;
}

.shadow-text-bold,
.shadow-text-bolder,
.shadow-text-boldest {
  font-weight: 500;
  color: rgba(0, 0, 0, 0.84);
  text-shadow: 0.15px 0.15px 0.1px rgba(0, 0, 0, 0.84)
}

.shadow-text-bolder {
  text-shadow: 0.3px 0.3px 0.1px rgba(0, 0, 0, 0.84)
}

.shadow-text-boldest {
  color: rgba(0, 0, 0, 0.9);
  text-shadow: 0.08px 0 0 rgba(0, 0, 0, 0.9);
}
<!DOCTYPE html>

<head></head>
<html>

<body>
  <br />
  <div>The first two tables apply default font-weights of 500 and 600 to achieve text highlighting betweeen column headings and table content.</div>
  <div class="center-block">
    <div style="font-family: Arial, Helvetica, sans-serif;">
      <div class="center-block margintb-8" style="font-weight: 600; color: #000">Subscriptions Arial Web Safe</div>
      <div class="center-block">
        <div class="text-container-light-overflow-container">
          <div class="table-r">
            <div class='column0'></div>
            <div class='column-w'></div>
            <div class='column-w'></div>
            <div class='row-r'>
              <div class='cell-r-center' style="font-weight: 600">#</div>
              <div class='cell-r-center' style="font-weight: 600">Expiration</div>
              <div class='cell-r-center' style="font-weight: 600">Available</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border cell-40'> 1 </div>
              <div class='cell-r-center-border cell-100'>07/01/2027</div>
              <div class='cell-r-center-border cell-100'> $1927.90</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border cell-40'> 2 </div>
              <div class='cell-r-center-border cell-100'>07/01/2027</div>
              <div class='cell-r-center-border cell-100'> $1400.00</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border'> </div>
              <div class='cell-r-center-border'>--------</div>
              <div class='cell-r-center-border' style="font-weight: 600"> $2327.90</div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div style="font-family: 'Open Sans';">
      <div class="center-block margintb-8" style="font-weight: 600; color: #000">Subscriptions Open Sans</div>
      <div class="center-block">
        <div class="text-container-light-overflow-container">
          <div class="table-r">
            <div class='column0'></div>
            <div class='column-w'></div>
            <div class='column-w'></div>
            <div class='row-r'>
              <div class='cell-r-center' style="font-weight: 600">#</div>
              <div class='cell-r-center' style="font-weight: 600">Expiration</div>
              <div class='cell-r-center' style="font-weight: 600">Available</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border cell-40'> 1 </div>
              <div class='cell-r-center-border cell-100'>07/01/2027</div>
              <div class='cell-r-center-border cell-100'> $1927.90</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border cell-40'> 2 </div>
              <div class='cell-r-center-border cell-100'>07/01/2027</div>
              <div class='cell-r-center-border cell-100'> $1400.00</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border'> </div>
              <div class='cell-r-center-border'>--------</div>
              <div class='cell-r-center-border' style="font-weight: 600"> $2327.90</div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <br />
    <div style="font-family: 'Open Sans';">
      <span>The</span>
      <span class="shadow-text-boldest">second two tables</span><span> apply default font-weight of 500 and subtle text-shadowing to achieve text highlighting betweeen column headings and table content. There are also</span>
      <span class="shadow-text-boldest">three examples</span><span> of inline text highlighting in this paragraph to enhance content without screaming or altering the base text-font width, which is a <span class="shadow-text-boldest">real plus at times</span>.
      Just remember that the text-shadow effect will diminish as the font-size is increased and can cause <span style="font-weight: 600">unwanted destortions</span> when the font-size is made <span class="shadow-text-boldest" style="font-size: 6px; font-weight: 600;">very small.</span></span>.
      Notice the second from last "unwanted destortions" text. It is the Open Sans font at 600 font-weight. It is noticeably higher and thicker than the adjacent text. Compare to the text-shadow versions earlier in the paragraph.
    </div>
    <div style="font-family: Arial, Helvetica, sans-serif;">
      <div class="center-block shadow-text-bold margintb-8">Subscriptions Arial Web Safe</div>
      <div class="center-block">
        <div class="text-container-light-overflow-container">
          <div class="table-r">
            <div class='column0'></div>
            <div class='column-w'></div>
            <div class='column-w'></div>
            <div class='row-r'>
              <div class='cell-r-center shadow-text-bold'>#</div>
              <div class='cell-r-center shadow-text-bold'>Expiration</div>
              <div class='cell-r-center shadow-text-bold'>Available</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border cell-40'> 1 </div>
              <div class='cell-r-center-border cell-100'>07/01/2027</div>
              <div class='cell-r-center-border cell-100'> $1927.90</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border cell-40'> 2 </div>
              <div class='cell-r-center-border cell-100'>07/01/2027</div>
              <div class='cell-r-center-border cell-100'> $1400.00</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border'> </div>
              <div class='cell-r-center-border'>--------</div>
              <div class='cell-r-center-border shadow-text-bold'> $2327.90</div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div style="font-family: 'Open Sans';">
      <div class="center-block shadow-text-bold margintb-8">Subscriptions Open Sans</div>
      <div class="center-block">
        <div class="text-container-light-overflow-container">
          <div class="table-r">
            <div class='column0'></div>
            <div class='column-w'></div>
            <div class='column-w'></div>
            <div class='row-r'>
              <div class='cell-r-center shadow-text-bold'>#</div>
              <div class='cell-r-center shadow-text-bold'>Expiration</div>
              <div class='cell-r-center shadow-text-bold'>Available</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border cell-40'> 1 </div>
              <div class='cell-r-center-border cell-100'>07/01/2027</div>
              <div class='cell-r-center-border cell-100'> $1927.90</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border cell-40'> 2 </div>
              <div class='cell-r-center-border cell-100'>07/01/2027</div>
              <div class='cell-r-center-border cell-100'> $1400.00</div>
            </div>
            <div class='row-r'>
              <div class='cell-r-center-border'> </div>
              <div class='cell-r-center-border'>--------</div>
              <div class='cell-r-center-border shadow-text-bold'> $2327.90</div>
            </div>
          </div>
        </div>
      </div>
      <div class="center-block">
        <div class="center-block margint-16" style="font-weight: 600; color: rgba(0, 0, 0, 0.9);">
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0.65px 0 0 rgba(0, 0, 0, 0.9)">Testing 123</span>
          </div>
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0.55px 0 0 rgba(0, 0, 0, 0.9)">Testing 123</span>
          </div>
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0.45px 0 0 rgba(0, 0, 0, 0.9)">Testing 123</span>
          </div>
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0.3px 0 0 rgba(0, 0, 0, 0.9)">Testing 123</span>
          </div>
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0.08px 0 0 rgba(0, 0, 0, 0.9)">Testing 123</span>
          </div>
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0 0">Testing 123</span>
          </div>
        </div>
        <div class="center-block" style="color: rgba(0, 0, 0, 0.9)">
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0.65px 0 0 rgba(0, 0, 0, 0.9)">Testing 123</span>
          </div>
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0.55px 0 0 rgba(0, 0, 0, 0.9)">Testing 123</span>
          </div>
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0.45px 0 0 rgba(0, 0, 0, 0.9)">Testing 123</span>
          </div>
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0.3px 0 0 rgba(0, 0, 0, 0.9)">Testing 123</span>
          </div>
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0.08px 0 0 rgba(0, 0, 0, 0.9)">Testing 123</span>
          </div>
          <div>
            <span class="inline-block">Testing 123: </span><span class="inline-block" style="text-shadow: 0 0 rgba(0, 0, 0, 0.0);">Testing 123</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>

</html>
Highdown
  • 646
  • 1
  • 11
  • 23
0

I didn't read the question or the answers because all of them are way too long, but I am adding this in case it solves someone else's problem.

In my case I could control text boldness pretty finely using -webkit-text-strike-width.

Vic Seedoubleyew
  • 9,888
  • 6
  • 55
  • 76