On Mon, Feb 3, 2014 at 6:58 PM, Josh Soref <jso...@blackberry.com> wrote:
> Michal wrote: > > Wouldn't this be better handled by Brian's dream of > >browser-as-a-platform? > > I haven¹t worked through all the details, but I don¹t think so. If you > want to run the blackberry specific hooks and you browse to the app from > your blackberry browser, then you¹re going to be unhappy if it¹s a > different platform. > If you want BB-specific hooks with BB-browser, then target BB. If you want to test your app using cordova plugins on a desktop browser simulating a mobile phone, browser-as-a-platform is the I think the way to go. If you are done building your app on desktop, and now want to test more device specific styles (such as fonts), I would say that you should test on device. Is this prohibitively difficult on BB (I have not tried so not sure what the turnaround time is)? Perhaps the app harness + some of the auto-reload-on-device work that Braden is doing will help? > > Browser-as-an-engine might work, maybe. > I don't think so -- "engine" is the concept of replacing the use of the system webview, but thats still running on-device. > > > I understand that this solves your immediate problem, but I'm not sure > > extending serve is really the right long term solution for this. > > > > ..also, your idea of "automatically look for a well known file" could be > > done within the application by feature detecting that its running in a > > desktop browser. > > We¹re the SDK, not the application. I could tell authors ³if you want to > see the fonts, put in this magic², but I¹m hoping to avoid making each > author do that (where possible). There¹s also licensing fun w/ the fonts. > > I suppose that I could insert some code into cordova.js instead of having > serve manage the css. > > > Would it be prehibitive to dynamically inject the style > > on startup from the app itself? > > Doing it with a link: header is a lot cleaner than inserting strange logic > into cordova.js, butŠ > I didn't mean cordova.js -- I meant the specific app you are using for testing. You can ship cordova-cli hooks to add this if you want to share the functionality between several apps. I'm asking: do we really need to change the tools? > > We can and probably will provide templates which include a style saying > ³use font: Slate Pro². That¹s all you need for the platform engine. > > If we did use cordova.js instead of having serve provide the .css file, > we¹d still need a way to get the fonts to the browser-as-engine case > (which is handled by the .extra code). > > In case you¹re curious, installing fonts to a user¹s system is a no-go for > a number of reasons (* it¹s painful to try to manage ‹ often requiring > administrative privileges which isn¹t something we require, * Licensing is > wrong, * it pollutes the user¹s font-space or their computer¹s font-space > if shared, * it doesn¹t work if the user is visiting serve from a device > other than localhost). > >