r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

ICarii
28-Mar-2009
[12378]
the gob size is important in the wrapping calculations
Steeve
28-Mar-2009
[12379]
So what ?
ICarii
28-Mar-2009
[12380x2]
scan-fontset: func [fname fsize /style fstyle /local tmpfnt font-metrics 
charlist n][
	font-metrics: copy []

 tmpfnt: make system/standard/font compose [name: fname size: fsize 
 style: (either style [fstyle][none])]
	charlist: copy ""
	for n 32 126 1 [append charlist to-char n]
	forall charlist [
		append font-metrics size-text make gob! compose [
			offset: 0x0
			size: (as-pair fsize * 2 fsize * 2)
			text: [font tmpfnt size fsize (to-string first charlist)]
		]
	]
	append font-metrics charlist
	return font-metrics
]

probe scan-fontset "Lucida Sans" 24
that will get a basic 32-126 charset of requested font, size and 
style and return the metrics for you under R3.
Pekr
28-Mar-2009
[12382x2]
I really like, how this page is starting to look - that is what I 
call good realease-early, release often strategy - http://www.rebol.net/wiki/R3_Releases
One question towards linux and os-x builds - is it only a Core build, 
or View is included too?
Henrik
28-Mar-2009
[12384]
OSX is core only, and I think Linux too.
Steeve
28-Mar-2009
[12385]
Icarii, i don't see the interest to do such a mess.

Basically, when i have to get the size of a text , i just do a size-text 
on it.
ICarii
28-Mar-2009
[12386x2]
Steeve - just a simple way to get font-metrics for layout planning 
where you cannot rely on richtext in AGG working (eg it doesnt wrap, 
doesnt do bounds in Draw mode)
personally I doubt i'd go to the trouble to get it precise either.
Maxim
28-Mar-2009
[12388x3]
does size-text in R3 also only return size, or does it now also return 
offset of that size
cause without the baseline offset, you can't really know the overall 
height size of a word.
The best (most-precise) way to deal with this issue, is to calculate 
width char by char, by using the above func, and when you go past 
the width of your box,  you use size-text on the whole line, up to 
that char... but this IS slow.  If doing a multi-line text system, 
you should use font/size anyways for the height.
Steeve
28-Mar-2009
[12391]
Guys, there is some missunderstandings since a while.

Size-text is not usable on draw gobs, only on text gobs (that what 
we call rich-text gobs).

A multi-line text system should handle several text gobs (one per 
line).
It's the most simple and fastest system (it's what i do).

So that we don't need to calculate the size or the position of each 
chars in the line. 
And we don't need to manage a text wrapping mechanism.
ICarii
28-Mar-2009
[12392x2]
Another reason im interested in AGG richtext (as opposed to text 
gobs) is that i'm intending to use OpenGL rather than rebol rendering 
once the plugin architecture is finalised.
rendering to draw/image then using the data as textures over GL frames 
requires the individual fontmetrics.
Pekr
1-Apr-2009
[12394x2]
Carl started to solve codecs in R3. What is more, he now seems to 
have some extended ideas :-)

http://www.rebol.net/r3blogs/0127.html
Wrong link, sorry - http://www.rebol.net/cgi-bin/r3blog.r?view=0183#comments
Steeve
1-Apr-2009
[12396]
awesome
Pekr
1-Apr-2009
[12397]
Heh, the post might not be posted by Carl, the signature reads Sasssenrath, 
with 3 "sss" :-)
DideC
1-Apr-2009
[12398]
I hope the "yellow background" color of Carl's anwers are not only 
due to the poster name. So it's a good hint ;-)
Pekr
1-Apr-2009
[12399x2]
IIRC yellow poster name also indicated your latest visit/read messages, 
but maybe I confuse it with how Altme displays messages .....
... well, except for technical nonsense, the person writing style 
was close to Carl's one. And the mention of Wildman suggests, it 
is some community member or lurking Amiga fanboy knowing what the 
Wildman was supposed to be about :-)
DideC
1-Apr-2009
[12401]
Pekr hunting fish ;-)
PeterWood
1-Apr-2009
[12402]
The style may be close to Carl's but the spelling and grammar certainly 
aren't up to Carl's standard. He would never normally write so bady 
as "Why not write codec to load source code written in other language 
than Rebol".

Still it could be Carl trying to disguise his writing :-)
Geomol
1-Apr-2009
[12403]
I just noticed, R3 version 2.100.40 27-Mar-2009 came to several platforms:

Downloads: View: win/xp, Cores: osx/intel, osx/ppc, linux, linux/fedora

See: http://www.rebol.net/wiki/R3_Releases#View.exe_2.100.40_27-Mar-2009
Anton
1-Apr-2009
[12404]
Hooray! - now have linux console with scroll buffer.
BrianH
1-Apr-2009
[12405x2]
Two new alphas today - release early, release often :)

As of alpha 42 we now can load jpg, bmp, png and gif. The beginnings 
of the general codec architecture are there in the form of ENCODE, 
DECODE and ENCODING? functions. Oh, and LOAD has been rewritten again, 
with LOAD/next and multi-LOAD capabilities that go beyond R2.
Still waiting on DO/next though :(
Graham
1-Apr-2009
[12407]
no Tiff ?
[unknown: 5]
1-Apr-2009
[12408x5]
Anyone else have AVG antivirus mark R3 files as a trojan virus?
Virus found skintrim in rebol29904031.zip and rebhost.exe
its a false positive but could still turn off some people.
I had another similiar incident recently with FBSL that AVG had caught 
as well and had to report it in their forum but they fixed it fast.
For FBSL it was a false positive also.
Graham
2-Apr-2009
[12413x2]
yeah ... I wouldn't use AVG for that reason too.
Turns me right off ..and also comparisons that show AVG is the worst 
perfomer of the free antivirus software out there.
BrianH
2-Apr-2009
[12415x3]
Avira marked the same file as bad. It was a false positive for another 
reason - are people already writing malware in R3?
Every once in a while these antivirus softwares mark some innocuous 
component that happens to be used in malware as bad :(
The last false positive I got was the Windows port of BSD's firewall.
Sunanda
2-Apr-2009
[12418]
There's a lot of new code in there!
   alpha 30 thru alpha 36 -- 530K
   alpha 37 -- 531K
   alpha 40 -- 533K
   alpha 41 -- 568K
   alpha 42 -- 576K
Ammon
2-Apr-2009
[12419]
We can now load JPGs, PNGs, GIFs and BMPs.  Only adding 46k is pretty 
amazing.
Pekr
2-Apr-2009
[12420x2]
we've got 100th user to ugly console rebdev chat :-) so - we are 
growing :-)
Ammon - it seems we can't save in some formats, e.g. GIF ....
DideC
2-Apr-2009
[12422]
save : not gif. Only PNG, BMP like R2
Claude
2-Apr-2009
[12423]
what about the gui upgrade & performance  with table ?
Henrik
2-Apr-2009
[12424]
not there yet. still working on getting the basics straight.
Steeve
2-Apr-2009
[12425]
Don't treat Henrik, he currently has some problems with SET functionalyties 
:-)
Henrik
2-Apr-2009
[12426]
It was R2 related, actually. :-)
Claude
2-Apr-2009
[12427]
no problem.......... l  wanted to know ..........thank for your effort