[XeTeX] Binding control sequence to input character
ShreeDevi Kumar
shreeshrii at gmail.com
Tue Dec 23 05:07:29 CET 2014
Thanks for the suggestion, yes that would definitely be more elegant.
However I wanted to change just one mark in Siddhanta font, and the catcode
definition helps achieve that.
ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
On Tue, Dec 23, 2014 at 12:18 AM, Dominik Wujastyk <wujastyk at gmail.com>
wrote:
> Since the GNU FreeFont font is GPL'ed and the source code is publicly
> available, a more elegant solution would be to get the sources, and modify
> the particular characters in the font to meet your preferences, perhaps
> using FontForge <http://fontforge.github.io/en-US/>. Give the font a new
> name, and Bob's your uncle.
>
> Best,
> Dominik
>
>
> On 22 December 2014 at 08:47, ShreeDevi Kumar <shreeshrii at gmail.com>
> wrote:
>
>> Changing the define to the following fixed the positioning issue also.
>>
>> \def~{\kern-1.5pt\raisebox{-.3ex}{\Large{ꣳ}}}%
>>
>> Thanks for the help.
>>
>> ShreeDevi
>> ____________________________________________________________
>> भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
>>
>> On Mon, Dec 22, 2014 at 11:22 AM, ShreeDevi Kumar <shreeshrii at gmail.com>
>> wrote:
>>
>>> Thank you for your reply. Initially I could not figure out how to
>>> deactivate the catcode in the definition.
>>>
>>> Now, I have got it to work. It is for increasing the size of A8F3 DEVANAGARI
>>> SIGN CANDRABINDU VIRAMA in the Siddhanta font.
>>>
>>> Here is the code that worked for me ...
>>> ----
>>> % This is a Unicode file in devanagari script for processing with
>>> XeLaTex.
>>> \documentclass[11pt]{article}
>>> \usepackage{fontspec}
>>> \usepackage{polyglossia}
>>> \usepackage{xcolor}
>>> \setmainfont{FreeSerif}
>>> \newfontfamily\englishfont{FreeSerif}
>>> \newfontfamily\sanskritfont[Script=Devanagari]{Siddhanta}
>>>
>>> %\newfontfamily\devanagarifont[Script=Devanagari,Language=Sanskrit]{FreeSerif}
>>> \setdefaultlanguage{sanskrit}
>>> \setotherlanguage{english}
>>> %
>>> \begingroup
>>> \lccode`\~=`ꣳ
>>> \lowercase{\endgroup
>>> \def~{{\Large\textcolor{red}{ꣳ}}}%
>>> }
>>> \catcode`ꣳ=\active
>>> %
>>> \begin{document}
>>> आपो॒ वा इ॒दꣳ सर्वं॒ विश्वा॑ भू॒तान्यापः॑ प्रा॒णा वा आपः॑ \\
>>> प॒शव॒ आपोऽन्न॒मापोऽमृ॑त॒मापः॑ स॒म्राडापो॑ वि॒राडापः॑ \\
>>> स्व॒राडाप॒श्छन्दा॒ꣳस्यापो॒ ज्योती॒ꣳष्यापो॒ \\
>>> यजू॒ꣳष्याप॑स्स॒त्यमाप॒स्सर्वा॑ दे॒वता॒ आपो॒ \\
>>> भूर्भुव॒स्सुव॒राप॒ ओं॥
>>> \end{document}
>>> %%
>>> --------------
>>>
>>> I have another question now... is it possible to move this letter a bit
>>> to left - at the larger size the intercharacter spacing is larger than the
>>> rest of the text.
>>>
>>> I have attached the generated pdf - the 'mark' in question is in red.
>>>
>>> Thanks,
>>> Shree
>>>
>>> ShreeDevi
>>> ____________________________________________________________
>>> भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
>>>
>>> On Sun, Dec 21, 2014 at 10:45 PM, Philip Taylor <P.Taylor at rhul.ac.uk>
>>> wrote:
>>>
>>>>
>>>>
>>>> Philip Taylor wrote:
>>>>
>>>>>
>>>>> ShreeDevi Kumar wrote:
>>>>>
>>>>
>>>> Is it possible in xelatex to bind a control sequence to an input
>>>>>> character ?
>>>>>>
>>>>>
>>>>> I cannot think why not : can you not simply write :
>>>>>
>>>>> \def \mycontrolsequence {...}
>>>>>
>>>>
>>>> or even :
>>>>
>>>> \let \mycontrolsequence = ...
>>>>
>>>>
>>>> Philip Taylor
>>>>
>>>>
>>>> --------------------------------------------------
>>>> Subscriptions, Archive, and List information, etc.:
>>>> http://tug.org/mailman/listinfo/xetex
>>>>
>>>
>>>
>>
>>
>>
>> --------------------------------------------------
>> Subscriptions, Archive, and List information, etc.:
>> http://tug.org/mailman/listinfo/xetex
>>
>>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20141223/128f338d/attachment-0001.html>
More information about the XeTeX
mailing list