unicode font names
Richmond
richmondmathewson at gmail.com
Sat Jul 13 08:18:31 EDT 2013
On 07/13/2013 02:54 PM, index at kenjikojima.com wrote:
> Richmond,
>
> I found my problem.
> When I set a unicode label of pulldown menu, menu items are garbage characters.
>
> I typed Japanese characters "フォント" in field 1.
>
> set the unicodeLabel of btn "pulldown Menu" to the unicodeText of fld 1
>
> Then set them in btn "pulldown Menu".
>
>> on mouseDown
>> if the platform is "MacOS" then
>> set the textFont of me to "Osaka"
>> else
>> set the textFont of me to "Tahoma"
>> end if
>> get the fontNames
>> repeat for each line tLine in it
>> if the fontLanguage of tLine is "japanese" then
>> put tLine & cr after tFontNames
>> end if
>> end repeat
>> sort tFontNames
>> delete char -1 of tFontNames
>> set the text of me to tFontNames
>> end mouseDown
>>
>> on menuPick pItemName
>> set the textFont of fld "nihongo" to pItemName
>> end menuPick
>
> Thanks,
> --
> Kenji Kojima / 小島健治
> http://www.kenjikojima.com/
>
>
>
> On Jul 12, 2013, at 5:24 PM, index at kenjikojima.com wrote:
>
>> Richmond,
>>
>> I tried many times same script all day, but could not make. Strange.
>> Anyway I could. Thanks.
>>
>> on mouseDown
>> if the platform is "MacOS" then
>> set the textFont of me to "Osaka"
>> else
>> set the textFont of me to "Tahoma"
>> end if
>> get the fontNames
>> repeat for each line tLine in it
>> if the fontLanguage of tLine is "japanese" then
>> put tLine & cr after tFontNames
>> end if
>> end repeat
>> sort tFontNames
>> delete char -1 of tFontNames
>> set the text of me to tFontNames
>> end mouseDown
>>
>> on menuPick pItemName
>> set the textFont of fld "nihongo" to pItemName
>> end menuPick
>>
>> --
>> Kenji Kojima / 小島健治
>> http://www.kenjikojima.com/
>>
>>
>> On Jul 12, 2013, at 4:28 PM, Richmond wrote:
>>
>>> On 07/12/2013 10:16 PM, index at kenjikojima.com wrote:
>>>> Hi,
>>>> Can anybody set unicode font names of the fontNames to the menu items of pulldown menu?
>>>>
>>>> Thanks,
>>>> --
>>>> Kenji Kojima / 小島健治
>>>> http://www.kenjikojima.com/
>>>>
>>>>
>>>>
>>>>
>>> Well, I work with Unicode fonts all the time, and find that
>>>
>>> on mouseDown
>>> put the fontnames into me
>>> end mouseDown
>>>
>>> puts all the names of the fonts on my system into my pullDown menu;
>>>
>>> what is does (and maybe this is your problem) is that it lists the fonts
>>> by their Latin names,
>>> rather than their names in the language they are used for.
>>>
>>> For the sake of argument, an Arabic font may be listed as "Arabic4"
>>> rather than
>>> a name in Arabic script.
>>>
>>> Richmond.
>>>
>>>
Bravo!
More information about the use-livecode
mailing list