By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

7-bar display

P: n/a
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Francis

Oct 30 '06 #1
Share this Question
Share on Google+
11 Replies


P: n/a
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?
Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.

Two boxes one on top of the other, with fixed with and height, and quite
thick borders on all sides. Toggle border-color on the borders.

Here's a 2:

<head>
<style type="text/css">
body
{
background-color: white;
}
div
{
width: 200px;
height: 300px;
border: 50px solid black;
}
#top
{
border-left-color: white;
border-bottom-width: 25px;
}
#bottom
{
border-right-color: white;
border-top-width: 25px;
}
</style>
</head>
<body>
<div id="top"></div>
<div id="bottom"></div>
</body>

Maybe making the vertical bars a slightly different colour from the
horizontal ones would look good too.
Oct 30 '06 #2

P: n/a

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.

Two boxes one on top of the other, with fixed with and height, and quite
thick borders on all sides. Toggle border-color on the borders.

Here's a 2:

<head>
<style type="text/css">
body
{
background-color: white;
}
div
{
width: 200px;
height: 300px;
border: 50px solid black;
}
#top
{
border-left-color: white;
border-bottom-width: 25px;
}
#bottom
{
border-right-color: white;
border-top-width: 25px;
}
</style>
</head>
<body>
<div id="top"></div>
<div id="bottom"></div>
</body>

Maybe making the vertical bars a slightly different colour from the
horizontal ones would look good too.
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

Oct 30 '06 #3

P: n/a
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?
I hope not!
Oct 30 '06 #4

P: n/a

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

I hope not!
Why not?

Oct 30 '06 #5

P: n/a
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

I hope not!

Why not?
Many users like to have a feeling of control over what resides on their
hard disk. Things getting seamlessly downloaded is at odds with this
requirement.

Even apart from the obvious security problems, it's a practical thing
too. Suppose one day my text editor stops working properly. It is
easier to trace the cause of the problem if I don't have to consider the
possibility that a web site I visited altered my fonts installation.

I just thought of another way you could do your calculator digits. Since
you only need 10 digits plus comma and decimal point, you could just
make 12 images (gif, png etc.) of the digits and arrange those on your
page in the proper sequences.
Oct 30 '06 #6

P: n/a

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

I hope not!
Why not?

Many users like to have a feeling of control over what resides on their
hard disk. Things getting seamlessly downloaded is at odds with this
requirement.

Even apart from the obvious security problems, it's a practical thing
too. Suppose one day my text editor stops working properly. It is
easier to trace the cause of the problem if I don't have to consider the
possibility that a web site I visited altered my fonts installation.

I just thought of another way you could do your calculator digits. Since
you only need 10 digits plus comma and decimal point, you could just
make 12 images (gif, png etc.) of the digits and arrange those on your
page in the proper sequences.
What I meant by seamlessly was that I did not want the user to have to
follow a 9-point procedure involving rebooting, opening the register or
the like. If Imust ask his or her permission, that's no problem for me.

Francis

Oct 30 '06 #7

P: n/a
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

I hope not!

Why not?

Many users like to have a feeling of control over what resides on their
hard disk. Things getting seamlessly downloaded is at odds with this
requirement.

Even apart from the obvious security problems, it's a practical thing
too. Suppose one day my text editor stops working properly. It is
easier to trace the cause of the problem if I don't have to consider the
possibility that a web site I visited altered my fonts installation.

I just thought of another way you could do your calculator digits. Since
you only need 10 digits plus comma and decimal point, you could just
make 12 images (gif, png etc.) of the digits and arrange those on your
page in the proper sequences.

What I meant by seamlessly was that I did not want the user to have to
follow a 9-point procedure involving rebooting, opening the register or
the like. If Imust ask his or her permission, that's no problem for me.
Well if you're sure... I don't know the application of your page, but if
it's on the www, I'm not sure how many users will be inclined to install
a special font just to look at it. It's just not what people expect to
have to do.

Also I don't know if it's possible to install a font on Windows without
the 9-point procedure involving rebooting, but I don't know much about
Windows. You may have some luck asking on a Windows NG.
Oct 30 '06 #8

P: n/a

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

I hope not!

Why not?

Many users like to have a feeling of control over what resides on their
hard disk. Things getting seamlessly downloaded is at odds with this
requirement.

Even apart from the obvious security problems, it's a practical thing
too. Suppose one day my text editor stops working properly. It is
easier to trace the cause of the problem if I don't have to consider the
possibility that a web site I visited altered my fonts installation.

I just thought of another way you could do your calculator digits. Since
you only need 10 digits plus comma and decimal point, you could just
make 12 images (gif, png etc.) of the digits and arrange those on your
page in the proper sequences.
What I meant by seamlessly was that I did not want the user to have to
follow a 9-point procedure involving rebooting, opening the register or
the like. If Imust ask his or her permission, that's no problem for me.

Well if you're sure... I don't know the application of your page, but if
it's on the www, I'm not sure how many users will be inclined to install
a special font just to look at it. It's just not what people expect to
have to do.

Also I don't know if it's possible to install a font on Windows without
the 9-point procedure involving rebooting, but I don't know much about
Windows. You may have some luck asking on a Windows NG.
OK I'll do that. I'll use the gif idea if I can't get it to work
otherwise. Thanks for the input anyway.

Francis

Oct 30 '06 #9

P: n/a
In message <11**********************@i42g2000cwa.googlegroups .com>, Mon,
30 Oct 2006 00:22:55, vi**@systar.fr writes
>I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?
<URL:http://www.merlyn.demon.co.uk/js-anclk.htm#Txtradiobutton Do3
does that, near enough; you'd just have to change variable "Art". But
it's not 7-segment technology. Unicode should have a "black brick"
character, to improve contrast.

Section Digital on the same page will also do it, if you redraw the
figure graphics.
To really annoy the purists, set up a Table with rows and columns of
element width/height proportional to, say, 1, 3, 1, 2 repeating 3, 1
and set the 3*1 & 1*3 elements to black background for each ON segment.
Or something like that.

It's a good idea to read the newsgroup and its FAQ. See below.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Oct 31 '06 #10

P: n/a
vi**@systar.fr wrote:
[...]
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?
In theory there is - see
http://www.w3.org/TR/REC-CSS2/fonts....t-descriptions. In practice
Internet Explorer is the only browser I know which supports @font-face - see
http://www.microsoft.com/typography/...bedding/weft3/.
There are also other ideas - see http://www.mikeindustries.com/sifr/ for
example.

Boris
Nov 2 '06 #11

P: n/a
vi**@systar.fr wrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a
pocket calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to
update the display). I would use borders for the actual "bars"
since they are mitred (diagonal edges) just like on a pocket
calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to
display complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for
7-bar displays in Windows. Is there any way of seamlessly
downloading a font onto the user's PC?

I hope not!

Why not?

Many users like to have a feeling of control over what resides on
their hard disk. Things getting seamlessly downloaded is at odds with
this requirement.

Even apart from the obvious security problems, it's a practical thing
too. Suppose one day my text editor stops working properly. It is
easier to trace the cause of the problem if I don't have to consider
the possibility that a web site I visited altered my fonts
installation.

I just thought of another way you could do your calculator digits.
Since you only need 10 digits plus comma and decimal point, you could
just make 12 images (gif, png etc.) of the digits and arrange those on
your page in the proper sequences.

What I meant by seamlessly was that I did not want the user to have to
follow a 9-point procedure involving rebooting, opening the register or
the like. If Imust ask his or her permission, that's no problem for me.

Well if you're sure... I don't know the application of your page, but if
it's on the www, I'm not sure how many users will be inclined to install
a special font just to look at it. It's just not what people expect to
have to do.

Also I don't know if it's possible to install a font on Windows without
the 9-point procedure involving rebooting, but I don't know much about
Windows. You may have some luck asking on a Windows NG.

OK I'll do that. I'll use the gif idea if I can't get it to work
otherwise. Thanks for the input anyway.

Francis
There was a JavaScript file from one of the JavaScript sites that did this,
years ago. It used separate images for either the segments or the digits.

Doug.

--
We can't stop crime, so why don't we legalize it and
tax it out of existence?
- Will Rogers.

Nov 4 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.