Re: Browser widget cookies?

2019-08-28 Thread Tom Glod via use-livecode
Awesome! new possibilities! Thanks

On Wed, Aug 28, 2019 at 5:58 AM hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> > Geoff C. wrote:
> > If I set the url for the browser widget to a url, and the
> > server sets a cookie, can I read/modify/delete that cookie?
>
> Cookie structure (itemdel is ";").
>   item 1: A "name = value" pair containing the actual data,
>   item 2: An expiry date after which it is no longer valid,
>   item 3: The domain and path of the server.
>
> Now
>
>1. set the javascriptHandlers of widget "browser" to "JS"
>2. In the widget's script (or above it) write
>
>on JS x
>  replace ";" with ";" & cr in x -- it make more readable
>  put x into fld "Cookies"
>end JS
>
> Then, on mouseUp:
>
> -- read (you get only 'name=value' pairs, not expires nor path)
> do"liveCode.JS(document.cookie)" in widget "browser"
>
> -- create/modify (path is usually the current page)
> do"document.cookie = 'username=Geoff Canyon;" & \
>   "expires=Mon, 23 Dec 2019 22:30:00 UTC;" & \
>   "path=/;' " in widget "browser"
>
> -- delete (set it with an expiry date before today)
> do"document.cookie = 'username=Geoff Canyon;" & \
>   "expires=Sat, 23 Dec 2000 22:30:00 UTC;" & \
>   "path=/;' " in widget "browser"
>
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: high resolution when printing to pdf, either from images or pdf widgets

2019-08-28 Thread Monte Goulding via use-livecode



> On 28 Aug 2019, at 5:07 pm, Mark Waddingham via use-livecode 
>  wrote:
> 
> I'm not entirely clear what Monte meant by 'print to pdf directly' in one
> of those comments..

Ah I was talking about printing the PDF file directly. May have been before I 
realised there needed to be overlaid LC objects on the printout.

Cheers

Monte
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BugZilla move scheduled today

2019-08-28 Thread JJS via use-livecode

Hi Panos,


thanks for the notice !


Kind regards,

Jerry


Op 28-8-2019 om 15:52 schreef panagiotis merakos via use-livecode:

Hello all,

We are planning to move BugZilla to our new server today. This will take
some time, and during the move the BugZilla page will be unavailable.

Thank you for you patience,

Kind regards,
Panos
--
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Fonts on Android

2019-08-28 Thread J. Landman Gay via use-livecode
Droid Sans is available on all Android phones and was the system font for 
years. Newer versions of Android use Roboto. Both are available for 
download so you can install them on desktop to see how they'll look. They 
both support all styles and weights and also unicode.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On August 28, 2019 9:42:06 AM Dan Friedman via use-livecode 
 wrote:



Ralph,

The font came from Google Fonts (https://fonts.google.com/specimen/Barlow). 
 I would think its ok.


FWIW... I am just looking for a Helvetica-like font.  I have my project set 
to the default fonts "(system)".  But it looks like crap on Android!  So, 
I'm just looking for something that will look good and render correctly.  I 
will need a regular, bold and italic.


-Dan


On 8/28/19, 5:34 AM, "Ralph DiMola"  wrote:

   >After running FontInfo(), I see this:
   >
   >*Barlow Bold
   >bold
   >*Barlow Regular
   >Plain

   What I would have expected is:
   *Barlow
   bold
   plain

   Then it would work as expected.

   >When I set the font of my stack to "Barlow", everything (bold or not) 
   comes up as Barlow Bold.
   >When I set the font of my stack to "Barlow Regular", everything (bold or 
   not) comes up as Barlow Regular.


   This is because the OS is seeing these as 2 different fonts.
   Are the results of FontInfo() on the IDE or the Android device?

   I have seen oddities like this when the internal font name is 
   wrong/inconsistent or (for example)the regular version was created at a 
   later date and the original name was "Barlow bold" and there was no other 
   option than to name the new plain font to "Barlow regular". This would not 
   allow them to operate as a family.


   Ralph DiMola
   IT Director
   Evergreen Information Services
   rdim...@evergreeninfo.net

   -Original Message-
   From: Dan Friedman [mailto:d...@clearvisiontech.com]
   Sent: Tuesday, August 27, 2019 6:54 PM
   To: rdim...@evergreeninfo.net; 'How to use LiveCode'
   Subject: Re: Fonts on Android

   Ralph,

   Thank you for the reply.  But, I don’t see how this helps.  I have two fonts:

   Barlow-Bold.ttf
   Barlow-Regular.ttf

   After running FontInfo(), I see this:

   *Barlow Bold
   bold
   *Barlow Regular
   plain

   When I set the font of my stack to "Barlow", everything (bold or not) comes 
   up as Barlow Bold.
   When I set the font of my stack to "Barlow Regular", everything (bold or 
   not) comes up as Barlow Regular.


   Only thing I can think to do is to run thought EVERY object in my project 
   and set the textFont of that control to "Barlow Bold" or "Barlow Regular".  
   Then there's text fields with mixed text...  Do I run through every text 
   field and change the font of all bold text?   There has to be a way to map 
   "Barlow Regular" to plain text, and "Barlow Bold" to bold text.  I must be 
   missing something.


   -Dan



   On 8/27/19, 3:07 PM, "Ralph DiMola"  wrote:

   When I run into this problem I use the routine below to enumerate all the
   fonts and their styles.
   If you have both a "Plain" and "Bold" style for a font then you use the 
font
   name and set its style to "Bold"
   If you use a "bold" base font then its "plain" style IS the bold font and
   setting its style to "Bold" will do nothing.

   function FontInfo
  local fnames,fstyles,tlist

  put the fontnames into fnames
  sort fnames
  repeat for each line tfnt in fnames
 put "*"&tfnt&cr after tlist
 put the fontstyles(tfnt,0) into  fstyles
 repeat for each line tsty in fstyles
put space & tsty & cr after tlist
 end repeat
  end repeat
  delete char -1 in tlist
  return tlist
   end FontInfo

   Ralph DiMola
   IT Director
   Evergreen Information Services
   rdim...@evergreeninfo.net


   -Original Message-
   From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On 
Behalf
   Of Dan Friedman via use-livecode
   Sent: Tuesday, August 27, 2019 5:11 PM
   To: How to use LiveCode
   Cc: Dan Friedman
   Subject: Fonts on Android

   Greetings!

   I am able to get a custom font installed and running on a Android device.
   But, how do you handle the font family?   Included in my app is
   "myfont-Regular.ttf" and "myfont-bold.ttf".   When the app launches, I 
call:

   set the textFont of stack "main" to "myfont"

   It's only using the bold version (probably because it's first
   alphabetically).  Is there a way to map a font to a style so that text is 
"
   myfont-Regular" and bold text is "myfont-bold"?

   Thanks in advance,
   -Dan



   ___
   use-livecode mailing list
   use-livecode@lists.runrev.com
   Please visit this url to subs

Re: Fonts on Android

2019-08-28 Thread Dan Friedman via use-livecode
Ralph,

The font came from Google Fonts (https://fonts.google.com/specimen/Barlow).  I 
would think its ok.

FWIW... I am just looking for a Helvetica-like font.  I have my project set to 
the default fonts "(system)".  But it looks like crap on Android!  So, I'm just 
looking for something that will look good and render correctly.  I will need a 
regular, bold and italic.

-Dan


On 8/28/19, 5:34 AM, "Ralph DiMola"  wrote:

>After running FontInfo(), I see this:
>
>*Barlow Bold
>bold
>*Barlow Regular
>Plain

What I would have expected is:
*Barlow
bold
plain

Then it would work as expected.

>When I set the font of my stack to "Barlow", everything (bold or not) 
comes up as Barlow Bold. 
>When I set the font of my stack to "Barlow Regular", everything (bold or 
not) comes up as Barlow Regular.

This is because the OS is seeing these as 2 different fonts.
Are the results of FontInfo() on the IDE or the Android device?

I have seen oddities like this when the internal font name is 
wrong/inconsistent or (for example)the regular version was created at a later 
date and the original name was "Barlow bold" and there was no other option than 
to name the new plain font to "Barlow regular". This would not allow them to 
operate as a family.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: Dan Friedman [mailto:d...@clearvisiontech.com] 
Sent: Tuesday, August 27, 2019 6:54 PM
To: rdim...@evergreeninfo.net; 'How to use LiveCode'
Subject: Re: Fonts on Android

Ralph,

Thank you for the reply.  But, I don’t see how this helps.  I have two 
fonts:

Barlow-Bold.ttf
Barlow-Regular.ttf

After running FontInfo(), I see this:

*Barlow Bold
bold
*Barlow Regular
plain

When I set the font of my stack to "Barlow", everything (bold or not) comes 
up as Barlow Bold. 
When I set the font of my stack to "Barlow Regular", everything (bold or 
not) comes up as Barlow Regular.

Only thing I can think to do is to run thought EVERY object in my project 
and set the textFont of that control to "Barlow Bold" or "Barlow Regular".  
Then there's text fields with mixed text...  Do I run through every text field 
and change the font of all bold text?   There has to be a way to map "Barlow 
Regular" to plain text, and "Barlow Bold" to bold text.  I must be missing 
something.

-Dan



On 8/27/19, 3:07 PM, "Ralph DiMola"  wrote:

When I run into this problem I use the routine below to enumerate all 
the
fonts and their styles.
If you have both a "Plain" and "Bold" style for a font then you use the 
font
name and set its style to "Bold"
If you use a "bold" base font then its "plain" style IS the bold font 
and
setting its style to "Bold" will do nothing.

function FontInfo
   local fnames,fstyles,tlist
   
   put the fontnames into fnames
   sort fnames
   repeat for each line tfnt in fnames
  put "*"&tfnt&cr after tlist
  put the fontstyles(tfnt,0) into  fstyles
  repeat for each line tsty in fstyles
 put space & tsty & cr after tlist
  end repeat
   end repeat
   delete char -1 in tlist
   return tlist
end FontInfo

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On 
Behalf
Of Dan Friedman via use-livecode
Sent: Tuesday, August 27, 2019 5:11 PM
To: How to use LiveCode
Cc: Dan Friedman
Subject: Fonts on Android

Greetings!

I am able to get a custom font installed and running on a Android 
device.
But, how do you handle the font family?   Included in my app is
"myfont-Regular.ttf" and "myfont-bold.ttf".   When the app launches, I 
call:

set the textFont of stack "main" to "myfont" 

It's only using the bold version (probably because it's first
alphabetically).  Is there a way to map a font to a style so that text 
is "
myfont-Regular" and bold text is "myfont-bold"?

Thanks in advance,
-Dan

 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode






___
use-liv

BugZilla move scheduled today

2019-08-28 Thread panagiotis merakos via use-livecode
Hello all,

We are planning to move BugZilla to our new server today. This will take
some time, and during the move the BugZilla page will be unavailable.

Thank you for you patience,

Kind regards,
Panos
--
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: Fonts on Android

2019-08-28 Thread Ralph DiMola via use-livecode
>After running FontInfo(), I see this:
>
>*Barlow Bold
>bold
>*Barlow Regular
>Plain

What I would have expected is:
*Barlow
bold
plain

Then it would work as expected.

>When I set the font of my stack to "Barlow", everything (bold or not) comes up 
>as Barlow Bold. 
>When I set the font of my stack to "Barlow Regular", everything (bold or not) 
>comes up as Barlow Regular.

This is because the OS is seeing these as 2 different fonts.
Are the results of FontInfo() on the IDE or the Android device?

I have seen oddities like this when the internal font name is 
wrong/inconsistent or (for example)the regular version was created at a later 
date and the original name was "Barlow bold" and there was no other option than 
to name the new plain font to "Barlow regular". This would not allow them to 
operate as a family.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: Dan Friedman [mailto:d...@clearvisiontech.com] 
Sent: Tuesday, August 27, 2019 6:54 PM
To: rdim...@evergreeninfo.net; 'How to use LiveCode'
Subject: Re: Fonts on Android

Ralph,

Thank you for the reply.  But, I don’t see how this helps.  I have two fonts:

Barlow-Bold.ttf
Barlow-Regular.ttf

After running FontInfo(), I see this:

*Barlow Bold
bold
*Barlow Regular
plain

When I set the font of my stack to "Barlow", everything (bold or not) comes up 
as Barlow Bold. 
When I set the font of my stack to "Barlow Regular", everything (bold or not) 
comes up as Barlow Regular.

Only thing I can think to do is to run thought EVERY object in my project and 
set the textFont of that control to "Barlow Bold" or "Barlow Regular".  Then 
there's text fields with mixed text...  Do I run through every text field and 
change the font of all bold text?   There has to be a way to map "Barlow 
Regular" to plain text, and "Barlow Bold" to bold text.  I must be missing 
something.

-Dan



On 8/27/19, 3:07 PM, "Ralph DiMola"  wrote:

When I run into this problem I use the routine below to enumerate all the
fonts and their styles.
If you have both a "Plain" and "Bold" style for a font then you use the font
name and set its style to "Bold"
If you use a "bold" base font then its "plain" style IS the bold font and
setting its style to "Bold" will do nothing.

function FontInfo
   local fnames,fstyles,tlist
   
   put the fontnames into fnames
   sort fnames
   repeat for each line tfnt in fnames
  put "*"&tfnt&cr after tlist
  put the fontstyles(tfnt,0) into  fstyles
  repeat for each line tsty in fstyles
 put space & tsty & cr after tlist
  end repeat
   end repeat
   delete char -1 in tlist
   return tlist
end FontInfo

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Dan Friedman via use-livecode
Sent: Tuesday, August 27, 2019 5:11 PM
To: How to use LiveCode
Cc: Dan Friedman
Subject: Fonts on Android

Greetings!

I am able to get a custom font installed and running on a Android device.
But, how do you handle the font family?   Included in my app is
"myfont-Regular.ttf" and "myfont-bold.ttf".   When the app launches, I call:

set the textFont of stack "main" to "myfont" 

It's only using the bold version (probably because it's first
alphabetically).  Is there a way to map a font to a style so that text is "
myfont-Regular" and bold text is "myfont-bold"?

Thanks in advance,
-Dan

 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Browser widget cookies?

2019-08-28 Thread hh via use-livecode
> Geoff C. wrote:
> If I set the url for the browser widget to a url, and the
> server sets a cookie, can I read/modify/delete that cookie?

Cookie structure (itemdel is ";").
  item 1: A "name = value" pair containing the actual data,
  item 2: An expiry date after which it is no longer valid,
  item 3: The domain and path of the server.

Now
  
   1. set the javascriptHandlers of widget "browser" to "JS"
   2. In the widget's script (or above it) write
  
   on JS x
 replace ";" with ";" & cr in x -- it make more readable
 put x into fld "Cookies"
   end JS

Then, on mouseUp:

-- read (you get only 'name=value' pairs, not expires nor path)
do"liveCode.JS(document.cookie)" in widget "browser"

-- create/modify (path is usually the current page)
do"document.cookie = 'username=Geoff Canyon;" & \
  "expires=Mon, 23 Dec 2019 22:30:00 UTC;" & \
  "path=/;' " in widget "browser"

-- delete (set it with an expiry date before today)
do"document.cookie = 'username=Geoff Canyon;" & \
  "expires=Sat, 23 Dec 2000 22:30:00 UTC;" & \
  "path=/;' " in widget "browser"




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: high resolution when printing to pdf, either from images or pdf widgets

2019-08-28 Thread Mark Waddingham via use-livecode

On 2019-08-27 17:24, Dr. Hawkins via use-livecode wrote:

I’ve seen references, even in the bug report, to “directly” printing
to pdf from a widget.


I'm not entirely clear what Monte meant by 'print to pdf directly' in 
one

of those comments... The 'print to pdf' mechanism in the engine isn't
really any different from the normal printing mechanism, its just that
rather than funnel the sequence of paths, images, text being rendered
through the system printer it funnels it through libcairo's 
(https://cairographics.org/)

PDF output functionality.

My experience has been that it still reduces the pdf to screen 
resolution.


Currently widgets render at screen resolution when printed - this 
includes

the PDF widget.


I still insist they the fact that the engine *renders* the pdf, rather
than including it, is a hard-core bug.  I attached an example of
including parts of a pdf into another.


You can insist this but you'd be wrong :)

If you want to augment an existing PDF with extra content then printing 
of

any form is not what you want.

Even when the various rather large and technical moving parts (pdfium, 
skia,
engine printing architecutre, engine pdf printer) involved in a 
non-rasterized
approach to printing pdf content displayed in stacks all align they 
would still

not result in the original pdf being embedded verbatim in the output.

In reality your 'example' of embedding isn't really embedding - its 
manually
editing a single object's stream to be clipped - PDF's in general tend 
to be
a fair bit more complicated than that in the general case and indeed not 
what
most people would want and/or expect (immediate bug report if it did: I 
printed
a small region of a 100Mb PDF to PDF and my output file was > 100Mb - 
WHY?!?!).


[ I'd point out here that even CoreGraphics with its native/builtin 
support for
PDF doesn't preserve original PDF content when you render a PDF into a 
PDF
printing context - indeed it tends to lose various annotations/metadata 
which

enable text to be copy/pasteable from the PDF ]


In the meantime, though, has anyone actually managed to get hi-res
output of either a pdf, jpg, or png into an outputted pdf?


What you should find is that if you have a stack with an image object at 
size
100x100 whose image (jpg or png) is actually 400x400, and then print it 
to pdf
then the full resolution of the image will be preserved. If this is not 
happening
then chances are there is a property set somewhere which is requiring 
some sort
of rasterization of the image object meaning the original image data 
cannot be
preserved (both PNG and JPEG image data passes straight through to the 
printing

backend when possible).


The only way I’m seeing at the moment would be a bizarre process in
which the stack is duplicated at 400%, and a script looping through to
expand and replace every field, reposition and change the text size,
etc., and then open the 33”x44” file in preview (or whatever) and
export from there as 8.5”x1” . . .


You shouldn't have to do that - all you should have to do is when 
printing your

stack...

1) set the width and height of your PDF widget to Upscale * the original 
size

2) import snapshot from pdf widget (make sure paintCompression is png)
3) hide pdf widget
4) set the width and height of the imported image to original size
5) print
6) delete image and show pdf widget


*IF* I could export to pdf at object density, I’d temporarily use png
extracted from the pdf with an external program.


You can - you just need to temporarily resize the pdf widget to upscale 
*

size in points as suggested above and use import/export snapshot.


And if I could fully figure out the pdf file structure, I could expand
my example file to write a custom pdf merging the field output with
other pdfs . .


In reality if you want original PDF preserved with additions on top then
that is your only option.

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode