Added the userAgent (thanks Paul), so you can use:
Code: Select all
put the userAgent -- returns the browser's user agent string
put the browserName -- does the same as above
Code: Select all
put the userAgent -- returns the browser's user agent string
put the browserName -- does the same as above
Code: Select all
save stack as "mystack"
Code: Select all
load stack [filename]
That says 'embedding small files' but I'm not sure if there's a size limit or what that limit might be so I checked:Data URIs, URLs prefixed with "data:", which allow embedding small files inline in documents, have been supported by major browsers since at least 2009.
Personally I would not call a file that is a half a gig in size a 'small' file, let alone a two-gig file!Browsers are not required to support any particular maximum length of data. Chromium and Firefox limit data URLs to 512MB, and Safari (WebKit) limits them to 2048MB. Note that Firefox 97 increased the limit from 256KB to 32MB, and Firefox 136 increased it to 512MB.
Yes, exactly that. The image object / control is what I mean. I haven't implemented any effects yet, such as drop shadows and that kind of malarkey. That's on the to-do-list too, eventually.OpenXTalkPaul wrote: ↑Sun Mar 23, 2025 1:29 pm I'm not sure what you mean about implementing an image in some different way because images already were implemented in HTML 1.0? Do you mean implement an image container object, so that it can be styled with borderColor, drop shadows and such? That makes sense I guess, because an image 'control' is NOT an image, it's a image view-prt, a container for an image.
Code: Select all
start using font file "C:/myFontFolder/myCustomFont.ttf"
Code: Select all
stop using font file "C:/myFontFolder/myCustomFont.ttf"
Code: Select all
start using font [fontname]
Code: Select all
stop using font [fontname]
Code: Select all
loadedFont = new FontFace("CustomFont", "url('angelina.ttf')");
Code: Select all
start using font file "C:/myFontFolder/myCustomFont.ttf"
Code: Select all
set the textFont of fld "xxx" to "myCustomFont.ttf"
Code: Select all
set the textFont of fld "xxx" to empty
Code: Select all
set the textfont of field "font" to "Angelina Regular"
Ah, okay - yes, that's a different thing altogether. This is only a subset of what you might have installed on your system. You kind of have to test for fonts being available in the browser, and loop through a list. (see line 26 in the javascript). This is an old method, but one I had kicking around from a previous experiment - dug out of the archiverichmond62 wrote: ↑Sun Mar 23, 2025 7:25 pm Notwithstanding that, a drop-down menu to select fonts as one might do in the Properties Palette of OXT to apply to a field, a button, or another object, might be a good thing.
Code: Select all
put byteOffset("c", "abcde") into tResult
put tResult -- returns 3
Code: Select all
put byteOffset("b", "abacadabra", 2) into tResult
put tResult -- returns 6
Code: Select all
put byteOffset("bark", "embarking") into tResult
put tResult -- returns 3
Code: Select all
put byteOffset("z", "abcde") into tResult
put tResult -- returns 0 as character not found in string
Code: Select all
put byteOffset("c", "abcde", -1) into tResult
put tResult -- returns expected error: byteOffset: skip count must be non-negative
You can do exactly that with my script I posted earlier. Just change the ttf reference to the name of your WOFF / WOFF2 font.richmond62 wrote: ↑Mon Mar 24, 2025 7:50 am What would be good, be it possible, would be the ability to use a WOFF font on one's system, and then some how attach it to the HTML document.
Sounds like he might have just used an online font converter, something like anyconv or cloudconvert to convert the TTF to WOFF, then use that in a webpage.richmond62 wrote: ↑Mon Mar 24, 2025 8:24 am a WOFF version of my Devawriter.ttf font with webpages exported from my Devawriter Pro.
Well, there you are then. He probably just set that in the CSS.richmond62 wrote: ↑Mon Mar 24, 2025 9:30 am No, he didn't: I sent him a WOFF and a WOFF2 version that I had hived off.
Users browsing this forum: No registered users and 4 guests