09-14-2022, 02:47 PM | #61 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
.sc { font-variant: small-caps; } <p class="sc">NOW IS THE TIME FOR ALL GOOD MEN TO COME TO THE AID OF THEIR COUNTRIES.</p> Code:
.sc { font-variant: small-caps; text-transform: lowercase; } <p>N<span class="sc">OW</span> I<span class="sc">S</span> T<span class="sc">HE</span> T<span class="sc">IME</span> F<span class="sc">OR</span> A<span class="sc">LL</span> G<span class="sc">OOD</span> M<span class="sc">EN</span> T<span class="sc">O</span> C<span class="sc">OME</span> T<span class="sc">O</span> T<span class="sc">HE</span> A<span class="sc">ID</span> O<span class="sc">F</span> T<span class="sc">HEIR</span> C<span class="sc">OUNTRIES</span>.</p> Last edited by JSWolf; 09-14-2022 at 03:56 PM. |
|
09-14-2022, 03:49 PM | #62 |
Addict
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
I believe the result of both of those would be the same, and once hard caps exist in the markup they aren’t fixable via CSS. You can go lower to upper but not the reverse. So, adding text-transform wouldn’t help either. You’ll get all caps (no small caps) either way.
Last edited by phillipgessert; 09-14-2022 at 03:52 PM. |
Advert | |
|
09-14-2022, 03:59 PM | #63 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Try the code in the last code block. remove the text-transform and watch it no longer work. |
|
09-14-2022, 04:07 PM | #64 |
Addict
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
I'll be darned. Not sure where I got the idea that text-transform: lowercase didn't work against hard caps.
|
09-14-2022, 06:28 PM | #65 | |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
You assume that the phrase will be listed in ALL UPPERCASE...thus you are forcing them to lowercase so you can apply a small-caps. You can get the same result if you just applied a smaller font-size to the all caps. small-caps does work when it is applied to a phrase that has upper and lower case letters. Telling people that they MUST ALWAYS apply text-transform:lowercase is not correct. Doing so will lose the ability to distinguish between capital and lowercase letters...they will all be the same size... It is soooo much nicer and cleaner code to have this: Code:
.sc {font-variant:small-caps} <p class="sc">Now Is The Time For All Good Men To Come To The Aid Of Their Countries.</p> Code:
.sc { font-variant: small-caps; text-transform: lowercase; } <p>N<span class="sc">OW</span> I<span class="sc">S</span> T <span class="sc">HE</span> T<span class="sc">IME</span> F <span class="sc">OR</span> A<span class="sc">LL</span> G <span class="sc">OOD</span> M<span class="sc">EN</span> T <span class="sc">O</span> C<span class="sc">OME</span> T <span class="sc">O</span> T<span class="sc">HE</span> A <span class="sc">ID</span> O<span class="sc">F</span> T <span class="sc">HEIR</span> C<span class="sc">OUNTRIES</span>.</p> And, yes Jon, the normal caveats about the app/device supporting the functionality still apply... When I come across text that is written in ALL CAPS and I want to display them using small-caps, I take the little bit of extra time to convert the ALL CAPS to either all lowercase or, most often, mixed case I don't leave them as ALL CAPS and then do a double transform in the CSS and add all those additional <span>s....it's just cleaner coding and makes the html easily readable. As always, you can do it however you want to. I just have to interrupt when you say people MUST do it your way. Cheers, Last edited by Turtle91; 09-14-2022 at 06:31 PM. |
|
Advert | |
|
09-14-2022, 06:50 PM | #66 | ||||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
Earlier in the thread there was some bad info going on about "all lowercase" smallcaps. Quote:
They even do a great job explaining all the localization issues. (Not all languages capitalize the same!) If you want all the technical details, as always, the specs explain even more: Quote:
This is the way I see it. Here are 4 different "methods" of doing smallcaps: Generated using this code (or see attached EPUB): Spoiler:
If you want to keep smallcaps in your ebooks, what you should aim for is 3 or 4. If, like Quoth said, you have oddities—like shrunken acronyms: "AM/PM", "NATO", or "FBI"—then it's up to you to decide what you want: Spoiler:
But, let it be known: This text-transform shenanigans won't work on Adobe Digital Editions (4.5): so I would not rely on it for maximum compatibility. Which is why, yet again, I recommend:
Those devices that have proper small-caps support/fonts will display great. Those that don't will still have a readable EPUB too! - - - Side Note: Acronyms are maybe the only case I could see JSWolf's text-transform being applicable. But, personally, I wouldn't go through all the trouble of tagging every acronym with markup. Side Note #2: If you did need to tag all acronyms though... Have I told you about the great way to use Spellcheck Lists? Similar to my "mark all foreign words" trick, you can:
Last edited by Tex2002ans; 09-14-2022 at 08:15 PM. |
||||
09-14-2022, 09:31 PM | #67 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
@Turtle91 you are missing the point.
Let's say you have an ePub that has lots of smallcaps such as a Discworld book featuring Death. Death speaks in smallcaps. In the eBook, you have the text as uppercase with spans to apply a smaller font size. Now if you are using a font that supports smallcaps and text-transform and you want to read with proper smallcaps, then why would you spend the time and effort to convert the text to lowercase when the text-transform will do it? All you have to do is add the text-transform and change the font size to a font-variant and you will have proper smallcaps. It's that easy. So if I was going to read this eBook in KePub on my Libra 2, I would have smallcaps without needing to convert the uppercase to lowercase. And if I ever decided to read this eBook with a program that did not support smallcaps, I could take out the text-transform line and change the font-variant to font-size and I'm good to go. That's why it's better to use uppercase for smallcaps then it is to use lowercase. You have options that way that work without the hassle of converting case. |
09-14-2022, 10:35 PM | #68 |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Personally I would just use a couple very simple regex to convert the ALL CAPS to sentence case (or Mixed Case) then apply small-caps. But that is just me.
If you want all that dialogue to be in lowercase small caps then go for it! You have my blessing... you see...I really don't care what you do to your books. I care about the fact that you are trying to tell people here on these forums incorrect information. You think that all small caps everywhere has to look the way you make DEATH talk..... and that dog don't hunt! |
09-15-2022, 12:00 AM | #69 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
The other method has 95% of the same disadvantages as F<small>AKE</small> C<small>APS</small>. It's only better because you see some proper smallcap letters! But you get all the mess with:
And if you're already going through creating all that disgusting markup... why not just substitute in one of our lowercasing/titlecasing regexes and fix the text itself! Clean, crisp, maintainable code... always the right decision! Last edited by Tex2002ans; 09-15-2022 at 12:06 AM. |
|
09-15-2022, 03:33 AM | #70 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
And if you want to re-read the eBook in say ePub on a Kobo, you'd have to change the case back to uppercase in order to have it work with simulated smallcaps.
|
09-15-2022, 09:42 AM | #71 |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
This is NOT about making this available on a wide range of devices/apps. The OP very specifically stated that it was for their own personal use on their own device which supports this functionality...
All Kobos are quite happy to render font-variant:small-caps; as long as your book is a kepub (i.e. everything Kobo sells). The small-caps will be 'simulated' from the font currently in use rather than a true small-caps font. If the OP wanted to read the book as an ePub on his Kobo, then your technique of forcing lowercase on the entire phrase before applying small-caps still wouldn't work...according to you, they would "have to change the case back to uppercase in order to have it work with simulated smallcaps." Your statements seem to argue against your own previous statements...you keep saying that small-caps ONLY works on lowercase...now you are saying they would all need to be uppercase??? Anyway...I am also officially DUN with this particular argument. Cheers! |
09-15-2022, 12:26 PM | #72 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
09-15-2022, 02:58 PM | #73 |
the rook, bossing Never.
Posts: 11,158
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Or only do small caps on paper and just use caps. Especially for a telegram, Apple II display etc even on paper. Sometimes small caps are wrong and you can't ensure they always work on ebooks, only PDF and paper.
|
09-17-2022, 04:22 PM | #74 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I have a family scrapbook with real Telegrams. There is only ONE case.
(Side note: My dad was a CW Ham Radio operator. He had a Smith Corona (referred to as a 'mill') with NO lower case. Shift just accessed the symbols, Both Upper and Lower positions on the type hammers were CAPS. Morse code has no 'case'.) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Concept] Telegram Bot for converting epubs to kepubs (and transferring) | Tommalka | Kobo Developer's Corner | 2 | 01-01-2022 04:03 AM |
Recipe request: Worcester Telegram | NSILMike | Recipes | 0 | 12-31-2020 08:52 AM |
Worcester Telegram Recipe request | NSILMike | Recipes | 0 | 10-11-2020 07:39 AM |
Green Island - Telegram-channel for authors and writers of books | Phil J. Parker | Self-Promotions by Authors and Publishers | 0 | 06-26-2018 02:23 PM |
E-readers chat (telegram, whatsapp)? | Mochy | Android Devices | 4 | 07-28-2015 08:46 AM |