Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #38518 > unrolled thread
| Started by | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| First post | 2020-07-18 05:48 -0700 |
| Last post | 2020-07-18 23:49 +0200 |
| Articles | 15 — 4 participants |
Back to article view | Back to comp.lang.javascript
Unicode signs vs lines "saving clockcycles" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-07-18 05:48 -0700
Re: Unicode signs vs lines "saving clockcycles" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-07-18 15:48 +0200
Re: Unicode signs vs lines "saving clockcycles" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-07-18 07:30 -0700
Re: Unicode signs vs lines "saving clockcycles" luserdroog <luser.droog@gmail.com> - 2020-07-18 11:43 -0700
Re: Unicode signs vs lines "saving clockcycles" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-07-18 23:52 +0200
Re: Unicode signs vs lines "saving clockcycles" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-07-18 15:32 -0700
Re: Unicode signs vs lines "saving clockcycles" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-07-19 16:49 +0200
Re: Unicode signs vs lines "saving clockcycles" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-07-19 08:57 -0700
Re: Unicode signs vs lines "saving clockcycles" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-07-19 08:59 -0700
Re: Unicode signs vs lines "saving clockcycles" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-07-19 23:17 +0200
Re: Unicode signs vs lines "saving clockcycles" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-07-19 15:30 -0700
Re: Unicode signs vs lines "saving clockcycles" luserdroog <luser.droog@gmail.com> - 2020-07-19 19:34 -0700
Re: Unicode signs vs lines "saving clockcycles" Arno Welzel <usenet@arnowelzel.de> - 2020-07-20 10:05 +0200
Re: Unicode signs vs lines "saving clockcycles" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-07-19 23:07 +0200
Re: Unicode signs vs lines "saving clockcycles" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-07-18 23:49 +0200
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2020-07-18 05:48 -0700 |
| Subject | Unicode signs vs lines "saving clockcycles" |
| Message-ID | <149e8fbb-13eb-42d4-8ab4-cb38e0e8bd70o@googlegroups.com> |
The unicode set have a bar fence symbole basicly square bar, so to do a full sheet page you need plot many for a bar row. How does it compare clockwise to make 5 lines? I guess the unicode symbol is somehow plotted like a scaleable bitmap? I would think using lines more effective but i am not sure? JT
[toc] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2020-07-18 15:48 +0200 |
| Message-ID | <XnsABFEA0E3CFBEEeejj99@194.109.6.166> |
| In reply to | #38518 |
=?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 18 Jul 2020 in comp.lang.javascript: > The unicode set have a bar fence symbole Dus it? What unicode? > basicly square bar, What do you mean? > so to do a full sheet page What is that? > you need plot many for a bar row. Do you? > How does it compare clockwise to make 5 lines? What about anti-clockwise? > I guess the unicode symbol is somehow plotted like a scaleable bitmap? Your guess is not as good ad mine, it stands to reason. > I would think using lines more effective but i am not sure? Define "more effective". What are "lines more effective"? Why a question mark, this seems to be a statement. ======= Please, Jonas, we can only help you if you ask a sensible question, and not have us guessing what you mean. ======= Unicoode is just a code number, the character itself, the symbol, depende on the character-map of the used font. <https://en.wikipedia.org/wiki/Unicode_font> It could be true-type <https://en.wikipedia.org/wiki/TrueType>. You can fake any character by using [1] an image, [2] a CSS-description or [3] a svg. CSS and SVG can be made dynamiic on hoder or onclick. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2020-07-18 07:30 -0700 |
| Message-ID | <493f126c-7318-48b0-bca9-8d9d6a85311eo@googlegroups.com> |
| In reply to | #38521 |
Den lördag 18 juli 2020 kl. 15:49:41 UTC+2 skrev Evertjan.: > =?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 18 > Jul 2020 in comp.lang.javascript: > > > The unicode set have a bar fence symbole > > Dus it? What unicode? > > > basicly square bar, > > What do you mean? > > > so to do a full sheet page > > What is that? > > > you need plot many for a bar row. > > Do you? > > > How does it compare clockwise to make 5 lines? > > What about anti-clockwise? > > > I guess the unicode symbol is somehow plotted like a scaleable bitmap? > > Your guess is not as good ad mine, it stands to reason. > > > I would think using lines more effective but i am not sure? > > Define "more effective". > What are "lines more effective"? > Why a question mark, this seems to be a statement. > > ======= > > Please, Jonas, we can only help you if you ask a sensible question, > and not have us guessing what you mean. > > ======= > > Unicoode is just a code number, the character itself, > the symbol, depende on the character-map of the used font. > <https://en.wikipedia.org/wiki/Unicode_font> > > It could be true-type > <https://en.wikipedia.org/wiki/TrueType>. > > You can fake any character by using > [1] an image, > [2] a CSS-description or > [3] a svg. > > CSS and SVG can be made dynamiic on hoder or onclick. > > > > > > > > > > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress) Well there is a unicode "character/symbol set for canvas", i just wonder is i should draw the lines or use the bar character. Which would be most wise performance wise... No need to be upset this just about music notation "music sheets" no need to get upset, noone going to lock you up Evertjan, even if it may not seem out of question.
[toc] | [prev] | [next] | [standalone]
| From | luserdroog <luser.droog@gmail.com> |
|---|---|
| Date | 2020-07-18 11:43 -0700 |
| Message-ID | <3eec9e74-d659-41de-92c6-9ac4178521c6o@googlegroups.com> |
| In reply to | #38522 |
On Saturday, July 18, 2020 at 9:30:46 AM UTC-5, Jonas Thörnvall wrote: > Well there is a unicode "character/symbol set for canvas", i just wonder is i should draw the lines or use the bar character. Which would be most wise performance wise... > > No need to be upset this just about music notation "music sheets" no need to get upset, noone going to lock you up Evertjan, even if it may not seem out of question. Drawing lines is almost certainly faster than setting text in Canvas. The glyphs in modern fonts are stored as line- and curve- drawing commands so it invokes the same line drawing machinery either way. Glyphs will likely be cached so setting the same character will speed up after the first one is rendered. But it's still invoking more logic than just drawing the lines directly.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2020-07-18 23:52 +0200 |
| Message-ID | <XnsABFEF2E7D3D5Aeejj99@194.109.6.166> |
| In reply to | #38529 |
luserdroog <luser.droog@gmail.com> wrote on 18 Jul 2020 in comp.lang.javascript: > Drawing lines is almost certainly faster than setting text in Canvas. > The glyphs in modern fonts are stored as line- and curve- drawing commands > so it invokes the same line drawing machinery either way. Glyphs will > likely be cached so setting the same character will speed up after the > first one is rendered. But it's still invoking more logic than just > drawing the lines directly. Since they are ment to be seen and interpreted by someone, as I presume, the number of cpu-clock-cycles seems unimportant. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2020-07-18 15:32 -0700 |
| Message-ID | <fece77d4-b0a5-4430-bbcc-7c2352252750o@googlegroups.com> |
| In reply to | #38537 |
Den lördag 18 juli 2020 kl. 23:52:47 UTC+2 skrev Evertjan.: > luserdroog <luser.droog@gmail.com> wrote on 18 Jul 2020 in > comp.lang.javascript: > > > Drawing lines is almost certainly faster than setting text in Canvas. > > The glyphs in modern fonts are stored as line- and curve- drawing commands > > so it invokes the same line drawing machinery either way. Glyphs will > > likely be cached so setting the same character will speed up after the > > first one is rendered. But it's still invoking more logic than just > > drawing the lines directly. > > Since they are ment to be seen and interpreted by someone, > as I presume, the number of cpu-clock-cycles seems unimportant. > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress) No evertjan i will write out notes in realtime sof every 5 bars or so the sheet if full and screen have to be updated with a new sheet.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2020-07-19 16:49 +0200 |
| Message-ID | <XnsABFFAB1F4C84eejj99@194.109.6.166> |
| In reply to | #38538 |
=?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 19 Jul 2020 in comp.lang.javascript: >> Since they are ment to be seen and interpreted by someone, >> as I presume, the number of cpu-clock-cycles seems unimportant. >> > No evertjan i will write out notes in realtime sof every 5 bars or so > the sheet if full and screen have to be updated with a new sheet. Yes, and since the barrs have to be able to be seen by someone, [otherwise why produce them in the first place,] that minimal viewing surely is a large multiple of the time needed to show a picture, a svh, a css stylized element. So optimalisation is not in any way efficient. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2020-07-19 08:57 -0700 |
| Message-ID | <db144980-b33e-4ae9-989f-837eb0c7f6e4o@googlegroups.com> |
| In reply to | #38545 |
Den söndag 19 juli 2020 kl. 16:49:22 UTC+2 skrev Evertjan.: > =?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 19 > Jul 2020 in comp.lang.javascript: > > >> Since they are ment to be seen and interpreted by someone, > >> as I presume, the number of cpu-clock-cycles seems unimportant. > >> > > No evertjan i will write out notes in realtime sof every 5 bars or so > > the sheet if full and screen have to be updated with a new sheet. > > Yes, and since the barrs have to be able to be seen by someone, [otherwise > why produce them in the first place,] that minimal viewing surely is a large > multiple of the time needed to show a picture, a svh, a css stylized > element. > > So optimalisation is not in any way efficient. > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress) You say writing out a full picture for every 5 bars eveny amount of x seconds is faster then render the characterset or drawlines? I feel hesitant. JT
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2020-07-19 08:59 -0700 |
| Message-ID | <5c7c4b9e-bf13-457c-bb13-5131653b9d07o@googlegroups.com> |
| In reply to | #38547 |
Den söndag 19 juli 2020 kl. 17:57:45 UTC+2 skrev Jonas Thörnvall: > Den söndag 19 juli 2020 kl. 16:49:22 UTC+2 skrev Evertjan.: > > =?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 19 > > Jul 2020 in comp.lang.javascript: > > > > >> Since they are ment to be seen and interpreted by someone, > > >> as I presume, the number of cpu-clock-cycles seems unimportant. > > >> > > > No evertjan i will write out notes in realtime sof every 5 bars or so > > > the sheet if full and screen have to be updated with a new sheet. > > > > Yes, and since the barrs have to be able to be seen by someone, [otherwise > > why produce them in the first place,] that minimal viewing surely is a large > > multiple of the time needed to show a picture, a svh, a css stylized > > element. > > > > So optimalisation is not in any way efficient. > > > > -- > > Evertjan. > > The Netherlands. > > (Please change the x'es to dots in my emailaddress) > > You say writing out a full picture for every 5 bars eveny amount of x seconds is faster then render the characterset or drawlines? > > I feel hesitant. > > JT I mean wasn't there a reason sprite was used? These unicode thingies is basicly sprites.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2020-07-19 23:17 +0200 |
| Message-ID | <XnsABFFECFB9B425eejj99@194.109.6.166> |
| In reply to | #38548 |
<jonas.thornvall@gmail.com> wrote on 19 Jul 2020 in comp.lang.javascript: > I mean wasn't there a reason sprite was used? Perhaps they needed a Coca-Cola brand drink? > These unicode thingies is basicly 'Basicly' is basically not an English word. > sprites. Not so, unicode is a numbered naming convention. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2020-07-19 15:30 -0700 |
| Message-ID | <5fa058d3-1fba-4b68-8a3d-586d43b569dao@googlegroups.com> |
| In reply to | #38555 |
Den söndag 19 juli 2020 kl. 23:17:52 UTC+2 skrev Evertjan.: > <jonas.thornvall@gmail.com> wrote on 19 Jul 2020 in comp.lang.javascript: > > > I mean wasn't there a reason sprite was used? > > Perhaps they needed a Coca-Cola brand drink? > > > These unicode thingies is basicly > > 'Basicly' is basically not an English word. > > > sprites. > > Not so, unicode is a numbered naming convention. > > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress) Err the things written on the canvas are, tiles, sprites.
[toc] | [prev] | [next] | [standalone]
| From | luserdroog <luser.droog@gmail.com> |
|---|---|
| Date | 2020-07-19 19:34 -0700 |
| Message-ID | <f89621b2-0c0b-4d58-9d84-a8398ae5fe1fo@googlegroups.com> |
| In reply to | #38556 |
On Sunday, July 19, 2020 at 5:30:09 PM UTC-5, Jonas Thörnvall wrote: > Den söndag 19 juli 2020 kl. 23:17:52 UTC+2 skrev Evertjan.: > > <jonas.thornvall@gmail.com> wrote on 19 Jul 2020 in comp.lang.javascript: > > > > > I mean wasn't there a reason sprite was used? > > > > Perhaps they needed a Coca-Cola brand drink? > > > > > These unicode thingies is basicly > > > > 'Basicly' is basically not an English word. > > > > > sprites. > > > > Not so, unicode is a numbered naming convention. > > > > > > -- > > Evertjan. > > The Netherlands. > > (Please change the x'es to dots in my emailaddress) > > Err the things written on the canvas are, tiles, sprites. I think 'glyphs' is the more correct term here. After the outline of the glyph is rendered to a bitmap, that bitmap gets stored in the font cache. Writing from the font cache to the canvas should be pretty quick because it's just a bitblt. So, yes, I think your intuition is right, here. Drawing characters to the canvas should be plenty fast. I'd probably use line drawing for the staff and measure lines, but for noteheads and accidentals then the music glyphs from a music font will probably be fine. Until you want to beam together several notes, that is. Then you'll need to be able to tweak the lengths of the stems to get them to line up.
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2020-07-20 10:05 +0200 |
| Message-ID | <hnl1j0F1ubiU1@mid.individual.net> |
| In reply to | #38556 |
Jonas Thörnvall: > Err the things written on the canvas are, tiles, sprites. No. In the context of computer graphis a "sprite" is a bitmap which is *indpendent* from the screen content and can be moved around freely. Also see: <https://en.wikipedia.org/wiki/Sprite_(computer_graphics)> One example for the use nowadays is the mouse cursor which is often implemented as a sprite. But "things written on the canvas" is just like paintint something on it. And this will become permanent - a canvas is just a bitmap on which you can paint. You can't write a unicode symbol to a canvas and then move it around like a sprite without destroying the background. -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2020-07-19 23:07 +0200 |
| Message-ID | <XnsABFFEB497EEE5eejj99@194.109.6.166> |
| In reply to | #38547 |
=?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 19 Jul 2020 in comp.lang.javascript: >> Yes, and since the barrs have to be able to be seen by someone, >> [otherwis > e >> why produce them in the first place,] that minimal viewing surely is a >> la > rge >> multiple of the time needed to show a picture, a svh, a css stylized >> element. >> >> So optimalisation is not in any way efficient. >> >> -- >> Evertjan. >> The Netherlands. >> (Please change the x'es to dots in my emailaddress) > > You say writing out a full picture for every 5 bars eveny amount of x > seconds is faster then render the characterset or drawlines? No, where do you read that. > I feel hesitant. Hesitant is doubtful to do something. You could measure the results, and compare them to the estimated actual time neccesary on screeen. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2020-07-18 23:49 +0200 |
| Message-ID | <XnsABFEF253CC87Deejj99@194.109.6.166> |
| In reply to | #38522 |
=?UTF-8?Q?Jonas_Th=C3=B6rnvall?= <jonas.thornvall@gmail.com> wrote on 18 Jul 2020 in comp.lang.javascript: > Well there is a unicode "character/symbol set for canvas", Is there? > i just wonder is i should draw the lines or use the bar character. According to an authority? > Which would be most wise performance wise... Wise according to whom ? > No need to be upset Is there ever a *need* to be upset? I don't think so, being upset, does that help you? > this just about music notation "music sheets" Is it? > no need to get upset, You are repeating yourself. > noone going to lock you up Evertjan, How would you know? You would have to know everyone, and that would not be very efficient, would it?. > even if it may not seem out of question. It might be. Are you starting a joke, Jonas? -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web