From ian at hixie.ch Fri Jul 12 13:16:59 2013 From: ian at hixie.ch (Ian Hickson) Date: Fri, 12 Jul 2013 20:16:59 +0000 (UTC) Subject: [html5] these simplifications simply must happen... In-Reply-To: References: Message-ID: On Thu, 2 May 2013, Amy Soyka wrote: > [...] > > why cant the styles tag follow suite and use: > > ? We could, though it would only work in future browsers. The problem is that it doesn't really add anything new, and everything we add has a cost, so we try to only add things that are really compelling. http://wiki.whatwg.org/wiki/FAQ#Where.27s_the_harm_in_adding.E2.80.94 -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From osartun at gmail.com Wed Jul 24 08:02:04 2013 From: osartun at gmail.com (Oliver Sartun) Date: Wed, 24 Jul 2013 17:02:04 +0200 Subject: [html5] Accessing the user's installed fonts Message-ID: Hello guys, for all I know it's not possible to retrieve a list of all fonts a user has installed on his system via JavaScript. Is that correct? You either have to use Flash or a rather hackish solution that involves assigning a potentially installed font to a DOM element and measuring its dimensions (http://remysharp.com/2008/07/08/how-to-detect-if-a-font-is-installed-only-using-javascript/) The thing is that in a webbased word processor (i.e. Google Docs, Zoho, etc.) a user wouldn't be able to use his own fonts which is a major disadvantage compared to native word processors. Especially professional users need to have access to their custom fonts. For instance, it wouldn't be possible to create advanced word processors / DTP applications like InDesign for the open web platform, if I get that right. Is a solution to this problem in the making? Or hasn't this been addressed yet? Or does a solution already exist that I'm not aware of? Thanks in advance! Best regards, Oliver Sartun From svartman95 at gmail.com Fri Jul 26 18:19:14 2013 From: svartman95 at gmail.com (Bjartur Thorlacius) Date: Sat, 27 Jul 2013 01:19:14 +0000 Subject: [html5] Accessing the user's installed fonts In-Reply-To: References: Message-ID: <51F32012.0@gmail.com> On 07/24/2013 03:02 PM, Oliver Sartun wrote: > for all I know it's not possible to retrieve a list of all fonts a > user has installed on his system via JavaScript. Is that correct? AFAIK, yes. > Is a solution to this problem in the making? Or hasn't this been > addressed yet? Or does a solution already exist that I'm not aware of? AFAIK, no. There are technical details that should be given some thought before an API to system fonts is implemented, such as the fact that the exact set of font that you have installed might be unique enough to effectively identify you, and thus track you. A defining characteristic of web apps is that, aside from execution speed and networking, they're equally broken everywhere?independent of your local selection of fonts. The normal way to go about selecting a set of fonts is by passing around a list of URIs of fonts in a W3C/WHATWG approved format. You have already suggested that access to some information is necessary. Now we need to reach a consensus on how necessary the information is, how hard it is to get without a browser API. The API has to be both useful enough and simple enough. And it'll either need to be asynchronous, like just about everything else in JavaScript, or otherwise account for the fact that a user may not let every web page he visits know about every font he has installed. And consider how the information would be accessed using existing web technologies: OAuth HTTP uri-list. Ponder whether access to local fonts is to specific of a function to be supported explicitly by web browsers. Well, web ?browsers?, anyway. From derernst at gmx.ch Mon Jul 29 01:52:36 2013 From: derernst at gmx.ch (Markus Ernst) Date: Mon, 29 Jul 2013 10:52:36 +0200 Subject: [html5] Accessing the user's installed fonts In-Reply-To: <51F32012.0@gmail.com> References: <51F32012.0@gmail.com> Message-ID: <51F62D54.4070006@gmx.ch> Am 27.07.2013 03:19 schrieb Bjartur Thorlacius: > On 07/24/2013 03:02 PM, Oliver Sartun wrote: >> for all I know it's not possible to retrieve a list of all fonts a >> user has installed on his system via JavaScript. Is that correct? > AFAIK, yes. > >> Is a solution to this problem in the making? Or hasn't this been >> addressed yet? Or does a solution already exist that I'm not aware of? > AFAIK, no. There are technical details that should be given some thought > before an API to system fonts is implemented, such as the fact that the > exact set of font that you have installed might be unique enough to > effectively identify you, and thus track you. I can confirm that. I have installed some fonts I designed myself and did not give to anyone else so far, so I would be perfectly identifyable and traceable by the list of installed fonts. > You have already suggested that access to some information is necessary. > Now we need to reach a consensus on how necessary the information is, > how hard it is to get without a browser API. The API has to be both > useful enough and simple enough. And it'll either need to be > asynchronous, like just about everything else in JavaScript, or > otherwise account for the fact that a user may not let every web page he > visits know about every font he has installed. > And consider how the information would be accessed using existing web > technologies: OAuth HTTP uri-list. Ponder whether access to local fonts > is to specific of a function to be supported explicitly by web browsers. How do the manufacturers of "cloud"-based office applications such as Google Docs or MS Office 365 handle this? Do their clients accept the fact that fonts they might have purchased are not useable in their office application? Or do they have local software installed that corresponds with the web-based applications? From osartun at gmail.com Mon Jul 29 02:58:48 2013 From: osartun at gmail.com (Oliver Sartun) Date: Mon, 29 Jul 2013 11:58:48 +0200 Subject: [html5] Accessing the user's installed fonts In-Reply-To: <51F32012.0@gmail.com> References: <51F32012.0@gmail.com> Message-ID: Hello Bjartur, 2013/7/27 Bjartur Thorlacius : > On 07/24/2013 03:02 PM, Oliver Sartun wrote: >> >> for all I know it's not possible to retrieve a list of all fonts a >> user has installed on his system via JavaScript. Is that correct? > > AFAIK, yes. > > >> Is a solution to this problem in the making? Or hasn't this been >> addressed yet? Or does a solution already exist that I'm not aware of? > > AFAIK, no. Thanks for the answers. > There are technical details that should be given some thought > before an API to system fonts is implemented, such as the fact that the > exact set of font that you have installed might be unique enough to > effectively identify you, and thus track you. Yes, I know that a lot of things have to be considered before adding a new feature to the webplatform. Concerning the traceability: It's still possible to achieve the same thing via Flash. So, if someone wants to access the user's fonts it's already possible. ========= I already got answers from Jeffrey Barke, but our conversation happened outside this mailinglist. So, for completeness' sake and with Jeffrey's consent I'm posting our conversation here: 2013/7/24 Jeffrey Barke : > What's wrong with using Flash? I mean, I hear you that it would be nice to implement this completely in JS, but check out the following: > > > > Will this not achieve what you're trying to do? > > Jeffrey 2013/7/25 Oliver Sartun : > Hey Jeffrey, > > thanks for your answer. > >> What's wrong with using Flash? I mean, I hear you that it would be nice to >> implement this completely in JS, but check out the following: >> >> > > That seems to be a practical solution. However, I'm looking for an > open webstandard kind of way. > >> Will this not achieve what you're trying to do? > > I probably should have explained what I'm actually working on: I'm > developing an experimental prototype of a webbased document editor for > my bachelor thesis. > The thesis is also about exploring the possibilities and limitations > of the Open Web Platform (apart from evaluating architectural design > approaches and other things). > And as my understanding of the Open Web Platform only includes open > web standards and Flash isn't specified as one (to my knowledge), I'm > leaving it out. > >> I mean, I hear you that it would be nice to >> implement this completely in JS > > So, I assume then, there is indeed no JavaScript way available so far? 2013/7/25 Jeffrey Barke : > Hi Oliver, > >> So, I assume then, there is indeed no JavaScript way available so far? > > AFAIK, there is not. And I don't think any of the various "HTML5" proposals, extensions, APIs and what-nots address this issue. :( > >> That seems to be a practical solution. > > Yeah, it's far from ideal, but if this were client work and it's "get it done" time, that Flash solution is what I'd do. > >> And as my understanding of the Open Web Platform only includes open >> web standards and Flash isn't specified as one (to my knowledge), I'm >> leaving it out. > > Yerp, Flash isn't one and should be left out. > >> The thesis is also about exploring the possibilities and limitations >> of the Open Web Platform (apart from evaluating architectural design >> approaches and other things). > > Good luck with the thesis! This should definitely go in the current limitations column. > > Jeffrey 2013/7/25 Oliver Sartun : > Hey Jeffrey, > > This is great! Thank you very much for these answers!! :) > > Oliver From jukka.k.korpela at kolumbus.fi Mon Jul 29 04:01:48 2013 From: jukka.k.korpela at kolumbus.fi (Jukka K. Korpela) Date: Mon, 29 Jul 2013 14:01:48 +0300 Subject: [html5] Accessing the user's installed fonts In-Reply-To: References: Message-ID: <51F64B9C.3000901@kolumbus.fi> 2013-07-24 18:02, Oliver Sartun wrote: > for all I know it's not possible to retrieve a list of all fonts a > user has installed on his system via JavaScript. Is that correct? It's not possible to retrieve such information in any standardized manner. > You either have to use Flash or a rather hackish solution that > involves assigning a potentially installed font to a DOM element and > measuring its dimensions There's also an old trick that works on IE (only), see e.g. http://forums.mozillazine.org/viewtopic.php?f=8&t=300609&start=0 I've used it on my page that lets you view (on IE) a piece of text in all the fonts installed on your system: http://www.cs.tut.fi/~jkorpela/listfonts1.html There are other similar services, and this might look like something you should do with software installed on your system. But I think it is an interesting possibility to implement it with HTML and JavaScript. > For > instance, it wouldn't be possible to create advanced word processors / > DTP applications like InDesign for the open web platform, if I get > that right. A more common need for access to font information arises if you wish to create an HTML application that has a simple font changer ? e.g., a dropdown that lets the user select the font of the copy text, or some special text. Even more often, authors face the problem of not knowing which of the fonts of their font-family list gets (or may get) applied. I can specify in CSS e.g. body { font-family: Calibri, Helvetica, Arial, sans-serif }, but how could I select other presentation to suit the font? I can't. For example, Helvetica and Arial need a considerably larger line-height than Calibri. Just relying on line-height: normal is not reasonable. Line height should also depend on line length and other issues; the "normal" value is, at best, a compromise. Typographic settings should depend on each other. The choice of a font should affect many other aspects. Authors who care about typography could do some simple programming to make the style settings different depending on e.g. the availability of the primary font. (One style if Calibri is available; something else if not, since we can pretty much expect virtually any system to have Arial or Helvetica.) The problem is that CSS does not have tools for it, so access to font list in JavaScript would indeed be desirable. This has been said years ago, and it seems that reluctance to implement it largely depends on expected security issues, basically security of personal data; see e.g. "Feature request: Get font list in Javascript", http://forums.mozillazine.org/viewtopic.php?f=8&t=300609&start=0 I think the usefulness of disclosing the information far exceeds the real impact of the risks. Currently, information about fonts is available in ways mentioned above - clumsy, hackish ways - so if this were a serious security breach, I think we would have heard of attacks using it. Providing a simple, standardized access to information would mainly help people who would use it to improve the quality of applications or pages. -- Yucca, http://www.cs.tut.fi/~jkorpela/ From osartun at gmail.com Mon Jul 29 04:01:59 2013 From: osartun at gmail.com (Oliver Sartun) Date: Mon, 29 Jul 2013 13:01:59 +0200 Subject: [html5] Accessing the user's installed fonts In-Reply-To: <51F62D54.4070006@gmx.ch> References: <51F32012.0@gmail.com> <51F62D54.4070006@gmx.ch> Message-ID: Hello Markus, 2013/7/29 Markus Ernst : > Am 27.07.2013 03:19 schrieb Bjartur Thorlacius: >> You have already suggested that access to some information is necessary. >> Now we need to reach a consensus on how necessary the information is, >> how hard it is to get without a browser API. The API has to be both >> useful enough and simple enough. And it'll either need to be >> asynchronous, like just about everything else in JavaScript, or >> otherwise account for the fact that a user may not let every web page he >> visits know about every font he has installed. >> And consider how the information would be accessed using existing web >> technologies: OAuth HTTP uri-list. Ponder whether access to local fonts >> is to specific of a function to be supported explicitly by web browsers. > > > How do the manufacturers of "cloud"-based office applications such as Google > Docs or MS Office 365 handle this? Do their clients accept the fact that > fonts they might have purchased are not useable in their office application? The fonts provided by the MS Word webapp seem to be only installed fonts on the user's system. The only font the MS Word webapp includes via @font-face is "Segoe UI Web" in three different styles. But this font isn't offered to the user to select it for writing, it's only used for the app's UI. Google Docs, Apple Pages for iCloud and zoho include at least some of the fonts they provide via @font-face. It seems that Apple Pages for iCloud doesn't rely on the user's installed fonts at all, but includes all of the fonts itself as it has a whole bunch of 350 @font-face rules in its stylesheet. However, none of them provide all of the user's installed fonts. So, their clients must accept the fact that special fonts they had purchased or created on their own aren't usable in their office application. In return, (thanks to the included fonts) they can use fonts they might not have on their own system. > Or do they have local software installed that corresponds with the web-based > applications? I didn't download anything that might correspond with the web-based applications. As none of the apps offer all of the user's installed fonts, they're apparently also not making use of the Flash-based solution for accessing the user's fonts. Oliver From ian at hixie.ch Fri Jul 12 13:16:59 2013 From: ian at hixie.ch (Ian Hickson) Date: Fri, 12 Jul 2013 20:16:59 +0000 (UTC) Subject: [html5] these simplifications simply must happen... In-Reply-To: References: Message-ID: On Thu, 2 May 2013, Amy Soyka wrote: > [...] > > why cant the styles tag follow suite and use: > > ? We could, though it would only work in future browsers. The problem is that it doesn't really add anything new, and everything we add has a cost, so we try to only add things that are really compelling. http://wiki.whatwg.org/wiki/FAQ#Where.27s_the_harm_in_adding.E2.80.94 -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From osartun at gmail.com Wed Jul 24 08:02:04 2013 From: osartun at gmail.com (Oliver Sartun) Date: Wed, 24 Jul 2013 17:02:04 +0200 Subject: [html5] Accessing the user's installed fonts Message-ID: Hello guys, for all I know it's not possible to retrieve a list of all fonts a user has installed on his system via JavaScript. Is that correct? You either have to use Flash or a rather hackish solution that involves assigning a potentially installed font to a DOM element and measuring its dimensions (http://remysharp.com/2008/07/08/how-to-detect-if-a-font-is-installed-only-using-javascript/) The thing is that in a webbased word processor (i.e. Google Docs, Zoho, etc.) a user wouldn't be able to use his own fonts which is a major disadvantage compared to native word processors. Especially professional users need to have access to their custom fonts. For instance, it wouldn't be possible to create advanced word processors / DTP applications like InDesign for the open web platform, if I get that right. Is a solution to this problem in the making? Or hasn't this been addressed yet? Or does a solution already exist that I'm not aware of? Thanks in advance! Best regards, Oliver Sartun From svartman95 at gmail.com Fri Jul 26 18:19:14 2013 From: svartman95 at gmail.com (Bjartur Thorlacius) Date: Sat, 27 Jul 2013 01:19:14 +0000 Subject: [html5] Accessing the user's installed fonts In-Reply-To: References: Message-ID: <51F32012.0@gmail.com> On 07/24/2013 03:02 PM, Oliver Sartun wrote: > for all I know it's not possible to retrieve a list of all fonts a > user has installed on his system via JavaScript. Is that correct? AFAIK, yes. > Is a solution to this problem in the making? Or hasn't this been > addressed yet? Or does a solution already exist that I'm not aware of? AFAIK, no. There are technical details that should be given some thought before an API to system fonts is implemented, such as the fact that the exact set of font that you have installed might be unique enough to effectively identify you, and thus track you. A defining characteristic of web apps is that, aside from execution speed and networking, they're equally broken everywhere?independent of your local selection of fonts. The normal way to go about selecting a set of fonts is by passing around a list of URIs of fonts in a W3C/WHATWG approved format. You have already suggested that access to some information is necessary. Now we need to reach a consensus on how necessary the information is, how hard it is to get without a browser API. The API has to be both useful enough and simple enough. And it'll either need to be asynchronous, like just about everything else in JavaScript, or otherwise account for the fact that a user may not let every web page he visits know about every font he has installed. And consider how the information would be accessed using existing web technologies: OAuth HTTP uri-list. Ponder whether access to local fonts is to specific of a function to be supported explicitly by web browsers. Well, web ?browsers?, anyway. From derernst at gmx.ch Mon Jul 29 01:52:36 2013 From: derernst at gmx.ch (Markus Ernst) Date: Mon, 29 Jul 2013 10:52:36 +0200 Subject: [html5] Accessing the user's installed fonts In-Reply-To: <51F32012.0@gmail.com> References: <51F32012.0@gmail.com> Message-ID: <51F62D54.4070006@gmx.ch> Am 27.07.2013 03:19 schrieb Bjartur Thorlacius: > On 07/24/2013 03:02 PM, Oliver Sartun wrote: >> for all I know it's not possible to retrieve a list of all fonts a >> user has installed on his system via JavaScript. Is that correct? > AFAIK, yes. > >> Is a solution to this problem in the making? Or hasn't this been >> addressed yet? Or does a solution already exist that I'm not aware of? > AFAIK, no. There are technical details that should be given some thought > before an API to system fonts is implemented, such as the fact that the > exact set of font that you have installed might be unique enough to > effectively identify you, and thus track you. I can confirm that. I have installed some fonts I designed myself and did not give to anyone else so far, so I would be perfectly identifyable and traceable by the list of installed fonts. > You have already suggested that access to some information is necessary. > Now we need to reach a consensus on how necessary the information is, > how hard it is to get without a browser API. The API has to be both > useful enough and simple enough. And it'll either need to be > asynchronous, like just about everything else in JavaScript, or > otherwise account for the fact that a user may not let every web page he > visits know about every font he has installed. > And consider how the information would be accessed using existing web > technologies: OAuth HTTP uri-list. Ponder whether access to local fonts > is to specific of a function to be supported explicitly by web browsers. How do the manufacturers of "cloud"-based office applications such as Google Docs or MS Office 365 handle this? Do their clients accept the fact that fonts they might have purchased are not useable in their office application? Or do they have local software installed that corresponds with the web-based applications? From osartun at gmail.com Mon Jul 29 02:58:48 2013 From: osartun at gmail.com (Oliver Sartun) Date: Mon, 29 Jul 2013 11:58:48 +0200 Subject: [html5] Accessing the user's installed fonts In-Reply-To: <51F32012.0@gmail.com> References: <51F32012.0@gmail.com> Message-ID: Hello Bjartur, 2013/7/27 Bjartur Thorlacius : > On 07/24/2013 03:02 PM, Oliver Sartun wrote: >> >> for all I know it's not possible to retrieve a list of all fonts a >> user has installed on his system via JavaScript. Is that correct? > > AFAIK, yes. > > >> Is a solution to this problem in the making? Or hasn't this been >> addressed yet? Or does a solution already exist that I'm not aware of? > > AFAIK, no. Thanks for the answers. > There are technical details that should be given some thought > before an API to system fonts is implemented, such as the fact that the > exact set of font that you have installed might be unique enough to > effectively identify you, and thus track you. Yes, I know that a lot of things have to be considered before adding a new feature to the webplatform. Concerning the traceability: It's still possible to achieve the same thing via Flash. So, if someone wants to access the user's fonts it's already possible. ========= I already got answers from Jeffrey Barke, but our conversation happened outside this mailinglist. So, for completeness' sake and with Jeffrey's consent I'm posting our conversation here: 2013/7/24 Jeffrey Barke : > What's wrong with using Flash? I mean, I hear you that it would be nice to implement this completely in JS, but check out the following: > > > > Will this not achieve what you're trying to do? > > Jeffrey 2013/7/25 Oliver Sartun : > Hey Jeffrey, > > thanks for your answer. > >> What's wrong with using Flash? I mean, I hear you that it would be nice to >> implement this completely in JS, but check out the following: >> >> > > That seems to be a practical solution. However, I'm looking for an > open webstandard kind of way. > >> Will this not achieve what you're trying to do? > > I probably should have explained what I'm actually working on: I'm > developing an experimental prototype of a webbased document editor for > my bachelor thesis. > The thesis is also about exploring the possibilities and limitations > of the Open Web Platform (apart from evaluating architectural design > approaches and other things). > And as my understanding of the Open Web Platform only includes open > web standards and Flash isn't specified as one (to my knowledge), I'm > leaving it out. > >> I mean, I hear you that it would be nice to >> implement this completely in JS > > So, I assume then, there is indeed no JavaScript way available so far? 2013/7/25 Jeffrey Barke : > Hi Oliver, > >> So, I assume then, there is indeed no JavaScript way available so far? > > AFAIK, there is not. And I don't think any of the various "HTML5" proposals, extensions, APIs and what-nots address this issue. :( > >> That seems to be a practical solution. > > Yeah, it's far from ideal, but if this were client work and it's "get it done" time, that Flash solution is what I'd do. > >> And as my understanding of the Open Web Platform only includes open >> web standards and Flash isn't specified as one (to my knowledge), I'm >> leaving it out. > > Yerp, Flash isn't one and should be left out. > >> The thesis is also about exploring the possibilities and limitations >> of the Open Web Platform (apart from evaluating architectural design >> approaches and other things). > > Good luck with the thesis! This should definitely go in the current limitations column. > > Jeffrey 2013/7/25 Oliver Sartun : > Hey Jeffrey, > > This is great! Thank you very much for these answers!! :) > > Oliver From jukka.k.korpela at kolumbus.fi Mon Jul 29 04:01:48 2013 From: jukka.k.korpela at kolumbus.fi (Jukka K. Korpela) Date: Mon, 29 Jul 2013 14:01:48 +0300 Subject: [html5] Accessing the user's installed fonts In-Reply-To: References: Message-ID: <51F64B9C.3000901@kolumbus.fi> 2013-07-24 18:02, Oliver Sartun wrote: > for all I know it's not possible to retrieve a list of all fonts a > user has installed on his system via JavaScript. Is that correct? It's not possible to retrieve such information in any standardized manner. > You either have to use Flash or a rather hackish solution that > involves assigning a potentially installed font to a DOM element and > measuring its dimensions There's also an old trick that works on IE (only), see e.g. http://forums.mozillazine.org/viewtopic.php?f=8&t=300609&start=0 I've used it on my page that lets you view (on IE) a piece of text in all the fonts installed on your system: http://www.cs.tut.fi/~jkorpela/listfonts1.html There are other similar services, and this might look like something you should do with software installed on your system. But I think it is an interesting possibility to implement it with HTML and JavaScript. > For > instance, it wouldn't be possible to create advanced word processors / > DTP applications like InDesign for the open web platform, if I get > that right. A more common need for access to font information arises if you wish to create an HTML application that has a simple font changer ? e.g., a dropdown that lets the user select the font of the copy text, or some special text. Even more often, authors face the problem of not knowing which of the fonts of their font-family list gets (or may get) applied. I can specify in CSS e.g. body { font-family: Calibri, Helvetica, Arial, sans-serif }, but how could I select other presentation to suit the font? I can't. For example, Helvetica and Arial need a considerably larger line-height than Calibri. Just relying on line-height: normal is not reasonable. Line height should also depend on line length and other issues; the "normal" value is, at best, a compromise. Typographic settings should depend on each other. The choice of a font should affect many other aspects. Authors who care about typography could do some simple programming to make the style settings different depending on e.g. the availability of the primary font. (One style if Calibri is available; something else if not, since we can pretty much expect virtually any system to have Arial or Helvetica.) The problem is that CSS does not have tools for it, so access to font list in JavaScript would indeed be desirable. This has been said years ago, and it seems that reluctance to implement it largely depends on expected security issues, basically security of personal data; see e.g. "Feature request: Get font list in Javascript", http://forums.mozillazine.org/viewtopic.php?f=8&t=300609&start=0 I think the usefulness of disclosing the information far exceeds the real impact of the risks. Currently, information about fonts is available in ways mentioned above - clumsy, hackish ways - so if this were a serious security breach, I think we would have heard of attacks using it. Providing a simple, standardized access to information would mainly help people who would use it to improve the quality of applications or pages. -- Yucca, http://www.cs.tut.fi/~jkorpela/ From osartun at gmail.com Mon Jul 29 04:01:59 2013 From: osartun at gmail.com (Oliver Sartun) Date: Mon, 29 Jul 2013 13:01:59 +0200 Subject: [html5] Accessing the user's installed fonts In-Reply-To: <51F62D54.4070006@gmx.ch> References: <51F32012.0@gmail.com> <51F62D54.4070006@gmx.ch> Message-ID: Hello Markus, 2013/7/29 Markus Ernst : > Am 27.07.2013 03:19 schrieb Bjartur Thorlacius: >> You have already suggested that access to some information is necessary. >> Now we need to reach a consensus on how necessary the information is, >> how hard it is to get without a browser API. The API has to be both >> useful enough and simple enough. And it'll either need to be >> asynchronous, like just about everything else in JavaScript, or >> otherwise account for the fact that a user may not let every web page he >> visits know about every font he has installed. >> And consider how the information would be accessed using existing web >> technologies: OAuth HTTP uri-list. Ponder whether access to local fonts >> is to specific of a function to be supported explicitly by web browsers. > > > How do the manufacturers of "cloud"-based office applications such as Google > Docs or MS Office 365 handle this? Do their clients accept the fact that > fonts they might have purchased are not useable in their office application? The fonts provided by the MS Word webapp seem to be only installed fonts on the user's system. The only font the MS Word webapp includes via @font-face is "Segoe UI Web" in three different styles. But this font isn't offered to the user to select it for writing, it's only used for the app's UI. Google Docs, Apple Pages for iCloud and zoho include at least some of the fonts they provide via @font-face. It seems that Apple Pages for iCloud doesn't rely on the user's installed fonts at all, but includes all of the fonts itself as it has a whole bunch of 350 @font-face rules in its stylesheet. However, none of them provide all of the user's installed fonts. So, their clients must accept the fact that special fonts they had purchased or created on their own aren't usable in their office application. In return, (thanks to the included fonts) they can use fonts they might not have on their own system. > Or do they have local software installed that corresponds with the web-based > applications? I didn't download anything that might correspond with the web-based applications. As none of the apps offer all of the user's installed fonts, they're apparently also not making use of the Flash-based solution for accessing the user's fonts. Oliver From ian at hixie.ch Fri Jul 12 13:16:59 2013 From: ian at hixie.ch (Ian Hickson) Date: Fri, 12 Jul 2013 20:16:59 +0000 (UTC) Subject: [html5] these simplifications simply must happen... In-Reply-To: References: Message-ID: On Thu, 2 May 2013, Amy Soyka wrote: > [...] > > why cant the styles tag follow suite and use: > > ? We could, though it would only work in future browsers. The problem is that it doesn't really add anything new, and everything we add has a cost, so we try to only add things that are really compelling. http://wiki.whatwg.org/wiki/FAQ#Where.27s_the_harm_in_adding.E2.80.94 -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From osartun at gmail.com Wed Jul 24 08:02:04 2013 From: osartun at gmail.com (Oliver Sartun) Date: Wed, 24 Jul 2013 17:02:04 +0200 Subject: [html5] Accessing the user's installed fonts Message-ID: Hello guys, for all I know it's not possible to retrieve a list of all fonts a user has installed on his system via JavaScript. Is that correct? You either have to use Flash or a rather hackish solution that involves assigning a potentially installed font to a DOM element and measuring its dimensions (http://remysharp.com/2008/07/08/how-to-detect-if-a-font-is-installed-only-using-javascript/) The thing is that in a webbased word processor (i.e. Google Docs, Zoho, etc.) a user wouldn't be able to use his own fonts which is a major disadvantage compared to native word processors. Especially professional users need to have access to their custom fonts. For instance, it wouldn't be possible to create advanced word processors / DTP applications like InDesign for the open web platform, if I get that right. Is a solution to this problem in the making? Or hasn't this been addressed yet? Or does a solution already exist that I'm not aware of? Thanks in advance! Best regards, Oliver Sartun From svartman95 at gmail.com Fri Jul 26 18:19:14 2013 From: svartman95 at gmail.com (Bjartur Thorlacius) Date: Sat, 27 Jul 2013 01:19:14 +0000 Subject: [html5] Accessing the user's installed fonts In-Reply-To: References: Message-ID: <51F32012.0@gmail.com> On 07/24/2013 03:02 PM, Oliver Sartun wrote: > for all I know it's not possible to retrieve a list of all fonts a > user has installed on his system via JavaScript. Is that correct? AFAIK, yes. > Is a solution to this problem in the making? Or hasn't this been > addressed yet? Or does a solution already exist that I'm not aware of? AFAIK, no. There are technical details that should be given some thought before an API to system fonts is implemented, such as the fact that the exact set of font that you have installed might be unique enough to effectively identify you, and thus track you. A defining characteristic of web apps is that, aside from execution speed and networking, they're equally broken everywhere?independent of your local selection of fonts. The normal way to go about selecting a set of fonts is by passing around a list of URIs of fonts in a W3C/WHATWG approved format. You have already suggested that access to some information is necessary. Now we need to reach a consensus on how necessary the information is, how hard it is to get without a browser API. The API has to be both useful enough and simple enough. And it'll either need to be asynchronous, like just about everything else in JavaScript, or otherwise account for the fact that a user may not let every web page he visits know about every font he has installed. And consider how the information would be accessed using existing web technologies: OAuth HTTP uri-list. Ponder whether access to local fonts is to specific of a function to be supported explicitly by web browsers. Well, web ?browsers?, anyway. From derernst at gmx.ch Mon Jul 29 01:52:36 2013 From: derernst at gmx.ch (Markus Ernst) Date: Mon, 29 Jul 2013 10:52:36 +0200 Subject: [html5] Accessing the user's installed fonts In-Reply-To: <51F32012.0@gmail.com> References: <51F32012.0@gmail.com> Message-ID: <51F62D54.4070006@gmx.ch> Am 27.07.2013 03:19 schrieb Bjartur Thorlacius: > On 07/24/2013 03:02 PM, Oliver Sartun wrote: >> for all I know it's not possible to retrieve a list of all fonts a >> user has installed on his system via JavaScript. Is that correct? > AFAIK, yes. > >> Is a solution to this problem in the making? Or hasn't this been >> addressed yet? Or does a solution already exist that I'm not aware of? > AFAIK, no. There are technical details that should be given some thought > before an API to system fonts is implemented, such as the fact that the > exact set of font that you have installed might be unique enough to > effectively identify you, and thus track you. I can confirm that. I have installed some fonts I designed myself and did not give to anyone else so far, so I would be perfectly identifyable and traceable by the list of installed fonts. > You have already suggested that access to some information is necessary. > Now we need to reach a consensus on how necessary the information is, > how hard it is to get without a browser API. The API has to be both > useful enough and simple enough. And it'll either need to be > asynchronous, like just about everything else in JavaScript, or > otherwise account for the fact that a user may not let every web page he > visits know about every font he has installed. > And consider how the information would be accessed using existing web > technologies: OAuth HTTP uri-list. Ponder whether access to local fonts > is to specific of a function to be supported explicitly by web browsers. How do the manufacturers of "cloud"-based office applications such as Google Docs or MS Office 365 handle this? Do their clients accept the fact that fonts they might have purchased are not useable in their office application? Or do they have local software installed that corresponds with the web-based applications? From osartun at gmail.com Mon Jul 29 02:58:48 2013 From: osartun at gmail.com (Oliver Sartun) Date: Mon, 29 Jul 2013 11:58:48 +0200 Subject: [html5] Accessing the user's installed fonts In-Reply-To: <51F32012.0@gmail.com> References: <51F32012.0@gmail.com> Message-ID: Hello Bjartur, 2013/7/27 Bjartur Thorlacius : > On 07/24/2013 03:02 PM, Oliver Sartun wrote: >> >> for all I know it's not possible to retrieve a list of all fonts a >> user has installed on his system via JavaScript. Is that correct? > > AFAIK, yes. > > >> Is a solution to this problem in the making? Or hasn't this been >> addressed yet? Or does a solution already exist that I'm not aware of? > > AFAIK, no. Thanks for the answers. > There are technical details that should be given some thought > before an API to system fonts is implemented, such as the fact that the > exact set of font that you have installed might be unique enough to > effectively identify you, and thus track you. Yes, I know that a lot of things have to be considered before adding a new feature to the webplatform. Concerning the traceability: It's still possible to achieve the same thing via Flash. So, if someone wants to access the user's fonts it's already possible. ========= I already got answers from Jeffrey Barke, but our conversation happened outside this mailinglist. So, for completeness' sake and with Jeffrey's consent I'm posting our conversation here: 2013/7/24 Jeffrey Barke : > What's wrong with using Flash? I mean, I hear you that it would be nice to implement this completely in JS, but check out the following: > > > > Will this not achieve what you're trying to do? > > Jeffrey 2013/7/25 Oliver Sartun : > Hey Jeffrey, > > thanks for your answer. > >> What's wrong with using Flash? I mean, I hear you that it would be nice to >> implement this completely in JS, but check out the following: >> >> > > That seems to be a practical solution. However, I'm looking for an > open webstandard kind of way. > >> Will this not achieve what you're trying to do? > > I probably should have explained what I'm actually working on: I'm > developing an experimental prototype of a webbased document editor for > my bachelor thesis. > The thesis is also about exploring the possibilities and limitations > of the Open Web Platform (apart from evaluating architectural design > approaches and other things). > And as my understanding of the Open Web Platform only includes open > web standards and Flash isn't specified as one (to my knowledge), I'm > leaving it out. > >> I mean, I hear you that it would be nice to >> implement this completely in JS > > So, I assume then, there is indeed no JavaScript way available so far? 2013/7/25 Jeffrey Barke : > Hi Oliver, > >> So, I assume then, there is indeed no JavaScript way available so far? > > AFAIK, there is not. And I don't think any of the various "HTML5" proposals, extensions, APIs and what-nots address this issue. :( > >> That seems to be a practical solution. > > Yeah, it's far from ideal, but if this were client work and it's "get it done" time, that Flash solution is what I'd do. > >> And as my understanding of the Open Web Platform only includes open >> web standards and Flash isn't specified as one (to my knowledge), I'm >> leaving it out. > > Yerp, Flash isn't one and should be left out. > >> The thesis is also about exploring the possibilities and limitations >> of the Open Web Platform (apart from evaluating architectural design >> approaches and other things). > > Good luck with the thesis! This should definitely go in the current limitations column. > > Jeffrey 2013/7/25 Oliver Sartun : > Hey Jeffrey, > > This is great! Thank you very much for these answers!! :) > > Oliver From jukka.k.korpela at kolumbus.fi Mon Jul 29 04:01:48 2013 From: jukka.k.korpela at kolumbus.fi (Jukka K. Korpela) Date: Mon, 29 Jul 2013 14:01:48 +0300 Subject: [html5] Accessing the user's installed fonts In-Reply-To: References: Message-ID: <51F64B9C.3000901@kolumbus.fi> 2013-07-24 18:02, Oliver Sartun wrote: > for all I know it's not possible to retrieve a list of all fonts a > user has installed on his system via JavaScript. Is that correct? It's not possible to retrieve such information in any standardized manner. > You either have to use Flash or a rather hackish solution that > involves assigning a potentially installed font to a DOM element and > measuring its dimensions There's also an old trick that works on IE (only), see e.g. http://forums.mozillazine.org/viewtopic.php?f=8&t=300609&start=0 I've used it on my page that lets you view (on IE) a piece of text in all the fonts installed on your system: http://www.cs.tut.fi/~jkorpela/listfonts1.html There are other similar services, and this might look like something you should do with software installed on your system. But I think it is an interesting possibility to implement it with HTML and JavaScript. > For > instance, it wouldn't be possible to create advanced word processors / > DTP applications like InDesign for the open web platform, if I get > that right. A more common need for access to font information arises if you wish to create an HTML application that has a simple font changer ? e.g., a dropdown that lets the user select the font of the copy text, or some special text. Even more often, authors face the problem of not knowing which of the fonts of their font-family list gets (or may get) applied. I can specify in CSS e.g. body { font-family: Calibri, Helvetica, Arial, sans-serif }, but how could I select other presentation to suit the font? I can't. For example, Helvetica and Arial need a considerably larger line-height than Calibri. Just relying on line-height: normal is not reasonable. Line height should also depend on line length and other issues; the "normal" value is, at best, a compromise. Typographic settings should depend on each other. The choice of a font should affect many other aspects. Authors who care about typography could do some simple programming to make the style settings different depending on e.g. the availability of the primary font. (One style if Calibri is available; something else if not, since we can pretty much expect virtually any system to have Arial or Helvetica.) The problem is that CSS does not have tools for it, so access to font list in JavaScript would indeed be desirable. This has been said years ago, and it seems that reluctance to implement it largely depends on expected security issues, basically security of personal data; see e.g. "Feature request: Get font list in Javascript", http://forums.mozillazine.org/viewtopic.php?f=8&t=300609&start=0 I think the usefulness of disclosing the information far exceeds the real impact of the risks. Currently, information about fonts is available in ways mentioned above - clumsy, hackish ways - so if this were a serious security breach, I think we would have heard of attacks using it. Providing a simple, standardized access to information would mainly help people who would use it to improve the quality of applications or pages. -- Yucca, http://www.cs.tut.fi/~jkorpela/ From osartun at gmail.com Mon Jul 29 04:01:59 2013 From: osartun at gmail.com (Oliver Sartun) Date: Mon, 29 Jul 2013 13:01:59 +0200 Subject: [html5] Accessing the user's installed fonts In-Reply-To: <51F62D54.4070006@gmx.ch> References: <51F32012.0@gmail.com> <51F62D54.4070006@gmx.ch> Message-ID: Hello Markus, 2013/7/29 Markus Ernst : > Am 27.07.2013 03:19 schrieb Bjartur Thorlacius: >> You have already suggested that access to some information is necessary. >> Now we need to reach a consensus on how necessary the information is, >> how hard it is to get without a browser API. The API has to be both >> useful enough and simple enough. And it'll either need to be >> asynchronous, like just about everything else in JavaScript, or >> otherwise account for the fact that a user may not let every web page he >> visits know about every font he has installed. >> And consider how the information would be accessed using existing web >> technologies: OAuth HTTP uri-list. Ponder whether access to local fonts >> is to specific of a function to be supported explicitly by web browsers. > > > How do the manufacturers of "cloud"-based office applications such as Google > Docs or MS Office 365 handle this? Do their clients accept the fact that > fonts they might have purchased are not useable in their office application? The fonts provided by the MS Word webapp seem to be only installed fonts on the user's system. The only font the MS Word webapp includes via @font-face is "Segoe UI Web" in three different styles. But this font isn't offered to the user to select it for writing, it's only used for the app's UI. Google Docs, Apple Pages for iCloud and zoho include at least some of the fonts they provide via @font-face. It seems that Apple Pages for iCloud doesn't rely on the user's installed fonts at all, but includes all of the fonts itself as it has a whole bunch of 350 @font-face rules in its stylesheet. However, none of them provide all of the user's installed fonts. So, their clients must accept the fact that special fonts they had purchased or created on their own aren't usable in their office application. In return, (thanks to the included fonts) they can use fonts they might not have on their own system. > Or do they have local software installed that corresponds with the web-based > applications? I didn't download anything that might correspond with the web-based applications. As none of the apps offer all of the user's installed fonts, they're apparently also not making use of the Flash-based solution for accessing the user's fonts. Oliver