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

World: r3wp

[View] discuss view related issues

Gregg
17-Sep-2010
[10343]
Go Max go!
Maxim
17-Sep-2010
[10344x2]
well, embedding the images is a no go... it inflates them to about 
half more (including  a compress and 64 base compression)  so I'll 
just use an url which loads the paths.
the script will end-up being about 800kb with nothing but image data 
and 9k of text at the end...
Chris
25-Sep-2010
[10346]
Can someone point me to solutions for detecting the names of installed 
fonts?  If possible for different platforms.
Graham
25-Sep-2010
[10347x3]
yes
Ashley posted something .. have a search
I tried reading the windows registry but the registry functions are 
broken ...
Gregg
25-Sep-2010
[10350]
A looooong time ago, Carl Read and I did something for TTFs on Windows. 
I can dig it up if you want Chris.
Graham
25-Sep-2010
[10351x3]
this is Ashley's code 



call/output {reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\Fonts"} fonts: copy ""



but although it works for me, I see that on other systems it just 
locks up.
reposted from 3rd March, AGG group
and ...


keys: list-reg/HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"
    probe keys


    keys: get-reg/HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" 
    "URW Palladio L Italic (TrueType)"
    probe keys


    keys: exists-reg?/HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\URW 
    Palladio L Italic (TrueType)" 
    probe keys

produces this

[]
URWPA32_0.TTF
false
Ashley
26-Sep-2010
[10354]
get-fonts: make function! [
	"Obtain list of fonts on supported platforms."
	/local s fonts
] [
	fonts: copy []
	either 3 = fourth system/version [

  call/output {reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows 
  NT\CurrentVersion\Fonts"} s: copy ""
		s: skip parse/all s "^-^/" 4
		foreach [fn reg style] s [
			fn: trim first parse/all fn "("
			all [
				not find fonts fn

    not find ["Estrangelo Edessa" "Gautami" "Latha" "Mangal" "Mv Boli" 
    "Raavi" "Shruti" "Tunga"] fn
				not find fn " Bold"
				not find fn " Italic"
				not find fn " Black"
				not find fn "WST_"
				insert tail fonts fn
			]
		]
	] [
		call/output "fc-list" s: copy ""
		s: parse/all s ":^/"
		foreach [fn style] s [
			all [
				not find fonts fn

    (size-text make face [text: "A" font: make font [name: fn size: 10]]) 
    <>

    size-text make face [text: "A" font: make font [name: fn size: 12 
    style: 'bold]]
				insert tail fonts fn
			]
		]
	]
	sort fonts
]
ddharing
11-Oct-2010
[10355x3]
Has anyone been writing much VID or Draw code for Linux? I've tried 
a number of distributions and get the same result -- REBOL/View 2.7.7 
has some serious issues. I can't even open the Demo folder on the 
Viewtop without getting a segmentation fault. Version 2.7.6 does 
not have this problem.
The List-View style code kept seg faulting. Rolling back to 2.7.6 
fixed the problem. I don't have this trouble with Windows.
I was testing on Ubuntu 10.04, TinyCoreLinux (latest) and Puppy Linux 
5.10.
Henrik
11-Oct-2010
[10358]
Fonts are usually a problem. I'm not sure what has changed between 
2.7.6 and 2.7.7 in this regard.
Andreas
11-Oct-2010
[10359]
ddharing, 2.7.7 works fine here on Ubuntu 10.04, as far as I can 
tell. The trick is to use the "Fedora" binary (2.7.7.4.3), _not_ 
the "Libc6" one.
ddharing
11-Oct-2010
[10360x3]
Henrik, have you tried opening the Rebol/Demo folder on the Viewtop 
in Linux? It always crashes on me. I think it's the Draw code for 
pretty background, but I never verified that -- just rolled back 
to get around the problem.
Andreas, I haven't tried that. Thanks for the tip.
I was using the Libc6 version.
Maxim
11-Oct-2010
[10363x2]
clipping had bugs in 2.7.7 with gradient fills.   he released a patch 
on windows, but never compiled it for linux.
btw, I've had the same crash in windows with the viewtop on windows.
ddharing
11-Oct-2010
[10365]
Maxim, what version of Windows?
Andreas
11-Oct-2010
[10366x2]
The problem is:
2.7.7.4.3 links against libXaw.so.7
2.7.7.4.2 links against libXaw7.so.7
(Or something like that. Haven't looked at it for a while.)
Maxim
11-Oct-2010
[10368x4]
xp.  its crashed using the standard 2.7.7 version... though it might 
not be specifically the same bug as you have.
it was just odd to me that opening the viewtop caused an error in 
the interpreter.
IIRC it doesn't happen all the time... so I've got no clue what the 
problem is.
though your linux version is probably addressed by Andreas' suggestions.
ddharing
11-Oct-2010
[10372x2]
I haven't had any Viewtop trouble with Windows. I'm going to try 
the Fedora version later today. I'm hopeful after Andreas' comments. 
Has anyone tried the OpenBSD version? I see that is the only current 
BSD version for View.
Carl seemed interested earlier this year in promoting OpenBSD even 
though FreeBSD seems to have a better web presence. When I was looking 
it over, it appears that OpenBSD does not have binary compatibility 
with FreeBSD or NetBSD. The latter two do seem to have binary compatibility.
Izkata
11-Oct-2010
[10374]
I've had to stick with Rebol 2.7.6 (in Ubuntu 10.04) because of draw 
issues on 2.7.7 - several things causing segfaults that were perfectly 
fine in 2.7.6
Gabriele
12-Oct-2010
[10375]
Draw crashes on 2.7.7 on Linux - you'll need to use 2.7.6
Andreas
12-Oct-2010
[10376]
Gabriele, do you have a simple test case to reproduce that crash?
Cyphre
12-Oct-2010
[10377]
I haven't tested it but since 2.7.7 had no changes in the DRAW code 
(AFAIK) it looks to me like some compiler issue or so...
Andreas
12-Oct-2010
[10378]
(All Viewtop demos run fine for me with 2.7.7.4.3 on Ubuntu 10.04.)
Anton
12-Oct-2010
[10379]
When Gabriele mentioned it first a while back, I was able to reproduce 
the crashing.
Gabriele
13-Oct-2010
[10380]
REBOL/View 2.7.7.4.2 6-Jan-2010
Copyright 2000-2010 REBOL Technologies.  All rights reserved.
REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM


Type desktop to start the Viewtop.
>> view layout [box effect [draw [pen black line 10x10 20x20]]]
Segmentation fault
Andreas
13-Oct-2010
[10381x2]
Yeah, works for me. Try 2.7.7.4.3 instead.
(Which means: crashes for me as well with 2.7.7.4.2, works just fine 
with 2.7.7.4.3. Which leads me to believe there's nothing inherently 
wrong with 2.7.7 per se, it's just some strangeness with the "Libc6" 
version.)
james_nak
13-Oct-2010
[10383]
In my quest to transform an object with nested objects back into 
an xml file I am running into an invalid path issue. Where obj is 
the object with other nested objects and p: person, first obj/:p 
works fine. However though obj/person/name  exists, I can't figure 
out how to store the path /person/name into p.

A couple of years ago Robert and Chris had a discussion about this. 
Anyone know if this can be done or not.? Thanks.
Maxim
13-Oct-2010
[10384]
use lit-path and then do the path.
james_nak
13-Oct-2010
[10385x2]
Thanks, I thought you might know that with all the stuff you do.
Well, I'm still getting the same error but after all of this I decided 
to go about it a different way. Thanks though.
Maxim
13-Oct-2010
[10387x2]
(you have a root / ... paths do not start with a slash  !)
person/name   not   /person/name
Steeve
13-Oct-2010
[10389]
James, about your object-to-xml need. The best way to express it 
when you speak to other programmers is to give them a concrete use 
case.
1/ mold the input
2/ mold the expected output.

Then, one can figure a solution without the need to decipher your 
patter ;-)
Oldes
13-Oct-2010
[10390]
first of all.. why you need to conver person/name into p? And why 
we discuss it in View group?
james_nak
13-Oct-2010
[10391]
Oldes, originally I was going to build a function that took the output 
of xml-to-object.r and change it back to xml. For that I was creating 
paths to the objects but couldn't get past the path being more than 
one level issue. 

As I mentioned, there was some discussion a few years back and there 
was mention that what worked in Core did not in View so rather than 
start something there, I thought it best to do that here.
I'm good now with my new approach.
Gabriele
14-Oct-2010
[10392]
Andreas, weird, last time I tried .4.3 it would segfault on start 
iirc - now seems to work ok.