Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 09-28-2016, 12:07 AM   #1
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
half star

Anyone ever seen unicode for half stars - I looked high and low, babblemap, w3, fileinfo etc. 'Course my eyes ain't what they used to be either.

BR

Last edited by BetterRed; 09-28-2016 at 01:21 AM.
BetterRed is offline   Reply With Quote
Old 09-28-2016, 02:15 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
You mean a star cut in half horizontal or vertical? As far as I know it isn't there. I have never seen it.
Toxaris is offline   Reply With Quote
Advert
Old 09-28-2016, 02:40 AM   #3
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by BetterRed View Post
Anyone ever seen unicode for half stars - I looked high and low, babblemap, w3, fileinfo etc. 'Course my eyes ain't what they used to be either.
AFAIK, half stars don't exist in Unicode, but someone has recently submitted a proposal for them.

If you don't want to use images, you could:

a) use a fraction glyph: ★★★★½
b) use a white star as a half star: ★★★★☆

In case you don't see the stars, here's their Unicode information:

Unicode Character 'BLACK STAR' (U+2605) ★
Unicode Character 'WHITE STAR' (U+2606) ☆
Doitsu is offline   Reply With Quote
Old 09-28-2016, 02:43 AM   #4
FizzyWater
You kids get off my lawn!
FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.
 
FizzyWater's Avatar
 
Posts: 4,220
Karma: 73492664
Join Date: Aug 2007
Location: Columbus, Ohio
Device: Oasis 2 and Libra H2O and half a dozen older models I can't let go of
Quote:
Originally Posted by Doitsu View Post
AFAIK, half stars don't exist in Unicode, but someone has recently submitted a proposal for them.

If you don't want to use images, you could:

a) use a fraction glyph: ★★★★½
b) use a white star as a half star: ★★★★☆

In case you don't see the stars, here's their Unicode information:

Unicode Character 'BLACK STAR' (U+2605) ★
Unicode Character 'WHITE STAR' (U+2606) ☆
For whatever my opinion is worth, if I saw option "b", I'd read that as "4 out of 5 stars", not "four-and-one-half stars".
FizzyWater is offline   Reply With Quote
Old 09-28-2016, 03:03 AM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Thanks guys - The question came to me as a result of calibre's recent support for half star ratings as in

Click image for larger version

Name:	Capture.JPG
Views:	411
Size:	12.1 KB
ID:	151972

I assumed the full star was Black Star (U+2605) and the half star was - good question. I assumed it was hidden in a corner I couldn't see.

Maybe Kovid has pre-empted acceptance of Ken Shirriff's proposal and he's using the HalfStarDemo.ttf - that might be it, the timing fits. He's had a lot of requests for half-stars.

BR
BetterRed is offline   Reply With Quote
Advert
Old 09-28-2016, 03:24 AM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by BetterRed View Post
Maybe Kovid has pre-empted acceptance of Ken Shirriff's proposal and he's using the HalfStarDemo.ttf - that might be it, the timing fits. He's had a lot of requests for half-stars.
The method suggested in this Stackoverflow thread also appears to be working with stars. However, it requires pseudo selector support.

Here's a proof of concept code:

Spoiler:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style>
.content {
    position: relative;
    font-size: 50px;
}

.content:after {
    position: absolute;
    overflow: hidden;
    content: "★";
    color: white;
}
.left .content:after {
    top: 0;
    left: 0;
    width: .50em;
}
</style>


</head>
<body>
<div class="left">Half star with pseudo elements: <span class="content">★</span></div>
</body>
</html>


Here's what it looks like in Sigil (and Calibre):

Doitsu is offline   Reply With Quote
Old 09-28-2016, 09:29 AM   #7
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,094
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
Neat - Thanks Doitsu!

I fiddled with your code and got it to show the left half of the star black with the right half missing if anyone is interested. (edit) I also changed the color from white to transparent so it'll work on any background color.

Spoiler:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style>
.content {
    position: relative;
    font-size: 50px;
    color: transparent;
}

.content:after {
    position: absolute;
    overflow: hidden;
    content: "★";
    color: black;
    top: 0;
    left: 0;
    width: .50em;
}
</style>


</head>
<body>
<div>Half star with pseudo elements: <span class="content">★</span></div>

<div style="background-color:blue">Half star with pseudo elements: <span class="content">★</span></div>
</body>
</html>


(edit-edit) You can change how much of the star is visible by changing the "width" (.25em for 1/4 star, .75em for 3/4 star)
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	435
Size:	16.2 KB
ID:	151989  

Last edited by Turtle91; 09-28-2016 at 09:53 AM.
Turtle91 is offline   Reply With Quote
Old 09-28-2016, 10:06 AM   #8
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Peeking the code and the repository, I think the answer is more along the line of a new font than a specific css.
Terisa de morgan is offline   Reply With Quote
Old 09-28-2016, 01:28 PM   #9
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
I made a component for wpf for this a while back...
Toxaris is offline   Reply With Quote
Old 09-28-2016, 10:57 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre uses the 1/2 unicode glyph: ★★★★½ alongwith a custom font to render it as a half star.
kovidgoyal is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Column for Half-Star Ratings Loosheesh Calibre 2 09-14-2016 01:45 PM
Screen half-broken, reading from other half Freet Sony Reader Dev Corner 1 07-31-2013 06:52 AM
Harvard creates cyborg flesh that’s half man, half machine xg4bx Lounge 1 09-02-2012 09:58 PM
[O'Reilly] "5 Star" rated eBooks half price expires August 16, 2012 at 11:59pm PT Cyberman tM Deals and Resources (No Self-Promotion or Affiliate Links) 0 08-10-2012 07:27 AM
half of my screen is blank and the other half is stuck in the USB condition. modsoul Sony Reader 1 11-04-2007 10:03 AM


All times are GMT -4. The time now is 03:54 AM.


MobileRead.com is a privately owned, operated and funded community.