You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Tilman Hausherr <TH...@t-online.de> on 2015/10/18 15:33:36 UTC
ttc collections as map
Should we offer some sort of map of name -> ttf-font? Currently a user
needs to go through a list of fonts
trueTypeCollection.getFonts()
until hitting the correct one. Shouldn't we have something like
trueTypeCollection.getFontByNameMap()
so a user who knows the fonts on the system could have code like
PDType0Font.load(document,
newTrueTypeCollection(newFile("c:/windows/fonts/MSGothic.ttc")).getFontByName().get("MS-Gothic"),
true);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: ttc collections as map
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 18.10.2015 um 15:55 schrieb Maruan Sahyoun:
> Hi,
>
>> Am 18.10.2015 um 15:33 schrieb Tilman Hausherr <TH...@t-online.de>:
>>
>> Should we offer some sort of map of name -> ttf-font? Currently a user needs to go through a list of fonts
>>
>> trueTypeCollection.getFonts()
>>
>> until hitting the correct one. Shouldn't we have something like
>>
>> trueTypeCollection.getFontByNameMap()
>>
>> so a user who knows the fonts on the system could have code like
>>
>> PDType0Font.load(document, newTrueTypeCollection(newFile("c:/windows/fonts/MSGothic.ttc")).getFontByName().get("MS-Gothic"), true);
>>
> good idea - maybe a little shorter such as
>
> PDType0Font.load(document, newTrueTypeCollection(newFile("c:/windows/fonts/MSGothic.ttc")).getFontByName("MS-Gothic"), true);
>
>
Yeah, good idea.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: ttc collections as map
Posted by John Hewson <jo...@jahewson.com>.
+1
— John
> On 18 Oct 2015, at 07:16, Andreas Lehmkuehler <an...@lehmi.de> wrote:
>
> Am 18.10.2015 um 15:55 schrieb Maruan Sahyoun:
>> Hi,
>>
>>> Am 18.10.2015 um 15:33 schrieb Tilman Hausherr <TH...@t-online.de>:
>>>
>>> Should we offer some sort of map of name -> ttf-font? Currently a user needs to go through a list of fonts
>>>
>>> trueTypeCollection.getFonts()
>>>
>>> until hitting the correct one. Shouldn't we have something like
>>>
>>> trueTypeCollection.getFontByNameMap()
>>>
>>> so a user who knows the fonts on the system could have code like
>>>
>>> PDType0Font.load(document, newTrueTypeCollection(newFile("c:/windows/fonts/MSGothic.ttc")).getFontByName().get("MS-Gothic"), true);
>>>
>>
>> good idea - maybe a little shorter such as
>>
>> PDType0Font.load(document, newTrueTypeCollection(newFile("c:/windows/fonts/MSGothic.ttc")).getFontByName("MS-Gothic"), true);
> +1
>
> BR
> Andreas
>
>>
>> BR
>> Maruan
>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org <ma...@pdfbox.apache.org>
>>> For additional commands, e-mail: dev-help@pdfbox.apache.org <ma...@pdfbox.apache.org>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org <ma...@pdfbox.apache.org>
>> For additional commands, e-mail: dev-help@pdfbox.apache.org <ma...@pdfbox.apache.org>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org <ma...@pdfbox.apache.org>
> For additional commands, e-mail: dev-help@pdfbox.apache.org <ma...@pdfbox.apache.org>
Re: ttc collections as map
Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Am 18.10.2015 um 15:55 schrieb Maruan Sahyoun:
> Hi,
>
>> Am 18.10.2015 um 15:33 schrieb Tilman Hausherr <TH...@t-online.de>:
>>
>> Should we offer some sort of map of name -> ttf-font? Currently a user needs to go through a list of fonts
>>
>> trueTypeCollection.getFonts()
>>
>> until hitting the correct one. Shouldn't we have something like
>>
>> trueTypeCollection.getFontByNameMap()
>>
>> so a user who knows the fonts on the system could have code like
>>
>> PDType0Font.load(document, newTrueTypeCollection(newFile("c:/windows/fonts/MSGothic.ttc")).getFontByName().get("MS-Gothic"), true);
>>
>
> good idea - maybe a little shorter such as
>
> PDType0Font.load(document, newTrueTypeCollection(newFile("c:/windows/fonts/MSGothic.ttc")).getFontByName("MS-Gothic"), true);
+1
BR
Andreas
>
> BR
> Maruan
>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: ttc collections as map
Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,
> Am 18.10.2015 um 15:33 schrieb Tilman Hausherr <TH...@t-online.de>:
>
> Should we offer some sort of map of name -> ttf-font? Currently a user needs to go through a list of fonts
>
> trueTypeCollection.getFonts()
>
> until hitting the correct one. Shouldn't we have something like
>
> trueTypeCollection.getFontByNameMap()
>
> so a user who knows the fonts on the system could have code like
>
> PDType0Font.load(document, newTrueTypeCollection(newFile("c:/windows/fonts/MSGothic.ttc")).getFontByName().get("MS-Gothic"), true);
>
good idea - maybe a little shorter such as
PDType0Font.load(document, newTrueTypeCollection(newFile("c:/windows/fonts/MSGothic.ttc")).getFontByName("MS-Gothic"), true);
BR
Maruan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org