Hi all, Due to the nature of the font I am using (which has horrendous looking combining diacritics), I have to call the unicodeglyphs directly through the \uchar command. Which works fine for the regular face. But I am unable to get the italic glyphs via the same method. So {\it \uchar{1}{01}} renders the 'normal' regular glyph. Could somebody help me out? Sjoerd
sjoerd siebinga wrote:
Hi all,
Due to the nature of the font I am using (which has horrendous looking combining diacritics), I have to call the unicodeglyphs directly through the \uchar command. Which works fine for the regular face. But I am unable to get the italic glyphs via the same method. So {\it \uchar{1}{01}} renders the 'normal' regular glyph.
Could somebody help me out?
does {\it blabla} give italic? if not, you don't have an italic font activated (try \it \fontname\font) Hans
Hi all,
Due to the nature of the font I am using (which has horrendous looking combining diacritics), I have to call the unicodeglyphs directly through the \uchar command. Which works fine for the regular face. But I am unable to get the italic glyphs via the same method. So {\it \uchar{1}{01}} renders the 'normal' regular glyph.
Could somebody help me out?
Is amacron (ā) the character that you want to use? Which font do you use (and which encoding and regime)? Do you use pdftex or any other platform (XeTeX perhaps)? You don't need to put silly \uchar{}{} definitions in the text, I'm sure there is a more elegant way to do it. If the placement of the macron doesn't suit your font, you can redefine it and get rid of those \uchar-s. You can still use unicode or whatever input encoding (regime) you need (Latin4/6/7?). Send a complete minimal example to the list, including font definitions. Mojca PS: if you need to use amacron/Amacron, you can try to be more annoying on the list. You would need another encoding then (enco-el, "dense" encoding) which has to be finished once in the near future.
Hi Hans and Mojca, Thanks for the quick replies. On 18 Jan 2006, at 15:22, Hans Hagen wrote:
Mojca Miklavec wrote:
You don't need to put silly \uchar{}{} definitions in the text, I'm
indeed, uchar is not for this purpose and has special meaning in cjk (mapping to special fonts) and xetex situations (mapping to unicode)
Actually, I thought it was a good solution. Let me explain my current project. I am typesetting a Festschrift including subjects on Indo-European (Sanskrit, Hittite, Old Greek, etc.), Slavic, Sino-Tibetan, and Japanese made up from 65 xml-files with decimal character entities. All the glyphs needed for these articles (save some silly ones like e with hungarian umlaut, m with subdot) are included in a font (Palatino Linostar) which was developed to accompany an etymological database (http://starling.rinet.ru/main.html) project devoted to proving or disproving the nostratic theory (all languages in the world originate from one source). The font was developed over the years and is no longer fully unicode-compliant. So my solution was to map the cmap hexadecimal values via the decimal entities to the \uchar command in a separate configuration file. For example: \defineXMLentity[257]{\uchar{1}{1}} % amacron % LATIN SMALL LETTER A WITH MACRON % 0x0101 I need about 2546 of them for all the special glyphs. This solution works fine, except the fact that I am unable to typeset the glyphs in bold and italic. Maybe this solution is a bit cumbersome. I am open for better solutions. On 18 Jan 2006, at 13:10, Mojca Miklavec wrote:
If the placement of the macron doesn't suit your font, you can redefine it and get rid of those \uchar-s.
What is the best way to redefine the accents (like macron, acute, etc.) to say a standard tex accent? Is there a command to pick up certain utf-glyphs that aren't picked- up by context? See the ƃ ǖ in my example file. On 18 Jan 2006, at 13:10, Mojca Miklavec wrote:
You can still use unicode or whatever input encoding (regime) you need (Latin4/6/7?). Send a complete minimal example to the list, including font definitions.
I have included a minimal testfile. I can send the pdf-output and zipfiles containing the encodingfiles and the linostarfont to you off- list since they are too big for the list. I am using texexec version 5.4.3 with pdftex 3.141592-1.30.3-2.2 (Web2C 7.5.5). Sjoerd
sjoerd siebinga wrote:
Hi Hans and Mojca,
Thanks for the quick replies.
On 18 Jan 2006, at 15:22, Hans Hagen wrote:
Mojca Miklavec wrote:
You don't need to put silly \uchar{}{} definitions in the text, I'm
indeed, uchar is not for this purpose and has special meaning in cjk (mapping to special fonts) and xetex situations (mapping to unicode)
Actually, I thought it was a good solution. Let me explain my current project.
I am typesetting a Festschrift including subjects on Indo-European (Sanskrit, Hittite, Old Greek, etc.), Slavic, Sino-Tibetan, and Japanese made up from 65 xml-files with decimal character entities. All the glyphs needed for these articles (save some silly ones like e with hungarian umlaut, m with subdot) are included in a font (Palatino Linostar) which was developed to accompany an etymological database (http://starling.rinet.ru/main.html) project devoted to proving or disproving the nostratic theory (all languages in the world originate from one source). The font was developed over the years and is no longer fully unicode-compliant.
So my solution was to map the cmap hexadecimal values via the decimal entities to the \uchar command in a separate configuration file.
For example:
\defineXMLentity[257]{\uchar{1}{1}} % amacron % LATIN SMALL LETTER A WITH MACRON % 0x0101
I need about 2546 of them for all the special glyphs.
This solution works fine, except the fact that I am unable to typeset the glyphs in bold and italic.
Maybe this solution is a bit cumbersome. I am open for better solutions.
On 18 Jan 2006, at 13:10, Mojca Miklavec wrote:
If the placement of the macron doesn't suit your font, you can redefine it and get rid of those \uchar-s.
What is the best way to redefine the accents (like macron, acute, etc.) to say a standard tex accent?
Is there a command to pick up certain utf-glyphs that aren't picked- up by context? See the ƃ ǖ in my example file.
On 18 Jan 2006, at 13:10, Mojca Miklavec wrote:
You can still use unicode or whatever input encoding (regime) you need (Latin4/6/7?). Send a complete minimal example to the list, including font definitions.
I have included a minimal testfile. I can send the pdf-output and zipfiles containing the encodingfiles and the linostarfont to you off- list since they are too big for the list.
I am using texexec version 5.4.3 with pdftex 3.141592-1.30.3-2.2 (Web2C 7.5.5).
did you try: \defineunicodefont [MySwitch] [MyOwnFont] % [command=\insertunicodeglyph] \definefontsynonym [MyOwnFontRegular] [Sans] \definefontsynonym [MyOwnFontItalic] [SansItalic] \MySwitch \uchar... \it ... The uchar command is a wrapper around a handler; currently only chinese and japanese handlers are defined, and you need a defaultcase. The \defineunicodefont installs a more advanced handler named \insertunicodeglyph which picks up the characters from the font ranges as you do. So, replace Sans and SansItalic by your alternatives UnicodeRegular and UnicodeItalic (btw this mechanism is rather complex because it needs to handle (1) fake unicode, i.e. you can define remappers, (2) unicode, (3) utf as input encoding, (4) special handlers, (5) ..... ) Even i get lost in the code -) Hans
Hi Hans, On 19 Jan 2006, at 00:26, Hans Hagen wrote:
did you try:
\defineunicodefont [MySwitch] [MyOwnFont] % [command= \insertunicodeglyph]
\definefontsynonym [MyOwnFontRegular] [Sans] \definefontsynonym [MyOwnFontItalic] [SansItalic]
\MySwitch \uchar... \it ...
Yes, but still no bold or italics. Maybe there is something wrong with my definitions. [code] \defineunicodefont [MySwitch] [mylinostar] % [command= \insertunicodeglyph] \loadmapfile[palatinolinostar_01xx-starling-linostar] \definefontsynonym [mylinostarRegular01] [palatinolinostar_01xx- PalatinoLinoStar] \definefontsynonym [mylinostarBold01] [palatinolinostar_01xx- PalatinoLinoStarBold] \definefontsynonym [mylinostarItalic01] [palatinolinostar_01xx- PalatinoLinoStarItalic] \starttext {\MySwitch \uchar{1}{1}} \\ {\MySwitch \it \uchar{1}{1}} \\ {\MySwitch \bf \uchar{1}{1}} \\ \stoptext [/code] I have installed the font without errors with TeXfont.
The uchar command is a wrapper around a handler; currently only chinese and japanese handlers are defined, and you need a defaultcase.
What do you mean by defaultcase?
(btw this mechanism is rather complex because it needs to handle (1) fake unicode, i.e. you can define remappers, (2) unicode, (3) utf as input encoding, (4) special handlers, (5) ..... ) Even i get lost in the code -)
I see what you mean. The font-uni.tex is an impressive piece of coding. Sjoerd
sjoerd siebinga wrote:
Hi� Hans,
On 19 Jan 2006, at 00:26, Hans Hagen wrote:
did you try:
\defineunicodefont [MySwitch] [MyOwnFont] % [command=\insertunicodeglyph]
\definefontsynonym [MyOwnFontRegular] [Sans]
\definefontsynonym [MyOwnFontItalic] [SansItalic]
\MySwitch \uchar... \it ...
Yes, but still no bold or italics. Maybe there is something wrong with my definitions.
[code] \defineunicodefont [MySwitch] [mylinostar] % [command=\insertunicodeglyph]
\loadmapfile[palatinolinostar_01xx-starling-linostar] \definefontsynonym [mylinostarRegular01] [palatinolinostar_01xx-PalatinoLinoStar] \definefontsynonym [mylinostarBold01] [palatinolinostar_01xx-PalatinoLinoStarBold] \definefontsynonym [mylinostarItalic01] [palatinolinostar_01xx-PalatinoLinoStarItalic]
\starttext {\MySwitch \uchar{1}{1}} \\� {\MySwitch \it \uchar{1}{1}} \\ {\MySwitch \bf \uchar{1}{1}}� \\
\stoptext
[/code]
I have installed the font without errors with TeXfont.�
can you test with: \unexpanded\def\unicodeglyph#1#2% watch the double mapping {\begingroup \getvalue{@@\currentucharmapping\strippedcsname\uchar}{#1}{#2}% \bodyfontsize\unicodescale\bodyfontsize \font\unicodefont=\truefontname{\unicodestyle\unicodeone} at \currentfontscale\bodyfontsize \unicodestrut \unicodefont\unicodecharcommand{\char\unicodetwo\relax}% \endgroup} i'll change the handlers in not applying a strut by default Hans
Hi Hans, On 19 Jan 2006, at 10:43, Hans Hagen wrote:
can you test with:
\unexpanded\def\unicodeglyph#1#2% watch the double mapping {\begingroup \getvalue{@@\currentucharmapping\strippedcsname\uchar}{#1}{#2}% \bodyfontsize\unicodescale\bodyfontsize \font\unicodefont=\truefontname{\unicodestyle\unicodeone} at \currentfontscale\bodyfontsize \unicodestrut \unicodefont\unicodecharcommand{\char\unicodetwo\relax}% \endgroup}
i'll change the handlers in not applying a strut by default
This seems to do the trick. The bold glyphs look fine. There is however one oddity in italics with the circumflex and caron on capitals and the macron in general. They are so vague that they are hardly visible. Sjoerd
sjoerd siebinga wrote:
Hi Hans,
On 19 Jan 2006, at 10:43, Hans Hagen wrote:
can you test with:
\unexpanded\def\unicodeglyph#1#2% watch the double mapping
�{\begingroup
� \getvalue{@@\currentucharmapping\strippedcsname\uchar}{#1}{#2}%
� \bodyfontsize\unicodescale\bodyfontsize
� \font\unicodefont=\truefontname{\unicodestyle\unicodeone}
� � at \currentfontscale\bodyfontsize
� \unicodestrut
�\unicodefont\unicodecharcommand{\char\unicodetwo\relax}%
� \endgroup}
i'll change the handlers in not applying a strut by default
This seems to do the trick. The bold glyphs look fine. There is however one oddity �in italics�with the circumflex and caron on capitals and the macron in general. They are so vague that they are hardly visible.
that's a font characteristic Hans
Hello Sjoerd! I found this thread rather interesting, even if my font problems are probably in another realm. Could you document your problem & solution in the wiki? I just tried to get my hands at the font: http://starling.rinet.ru/downl.php?lan=en#soft But the EXEs aren't self extracting ZIPs as I expected, but real installers (or something else), and I don't have access to a Windows machine at the moment. BTW if the fonts really are named "Palatino something" there may be trouble ahead, because Palatino is a trademark (that's why URW++ names their version "Palladio"). Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
Hello Hraban, On 19 Jan 2006, at 14:17, Henning Hraban Ramm wrote:
Hello Sjoerd!
I found this thread rather interesting, even if my font problems are probably in another realm. Could you document your problem & solution in the wiki?
Of course. But I am wrapped up in work coming three weeks. So if afterwards is fine could you tell me the best way to prepare a document for the wiki?
I just tried to get my hands at the font: http://starling.rinet.ru/downl.php?lan=en#soft But the EXEs aren't self extracting ZIPs as I expected, but real installers (or something else), and I don't have access to a Windows machine at the moment.
I had the same problem on mac os x. I can send you the ttf files off- list if you are interested.
BTW if the fonts really are named "Palatino something" there may be trouble ahead, because Palatino is a trademark (that's why URW++ names their version "Palladio").
I think the font is called Palatino Linostar. But I let the russians deal with the trademark problems. Sjoerd
sjoerd siebinga wrote:
BTW if the fonts really are named "Palatino something" there may be trouble ahead, because Palatino is a trademark (that's why URW++ names their version "Palladio").
I think the font is called Palatino Linostar. But I let the russians deal with the trademark problems.
they may not call it palatino (that's a linotype/zapf name) as is Palatino Nova (and Aldus and Palatino Sans and ...) I think that adding a Something is not permitted either Hans
Am 2006-01-19 um 17:35 schrieb sjoerd siebinga:
I found this thread rather interesting, even if my font problems are probably in another realm. Could you document your problem & solution in the wiki? Of course. But I am wrapped up in work coming three weeks. So if afterwards is fine could you tell me the best way to prepare a document for the wiki?
Take your time. Either you do it yourself: create an account, make up some name for the page, try to access it and enter your text; if you don't want to dive into Wiki syntax, we'll care for the markup. Or you just post it to this list, and I'll pick it up (if I've some time).
I just tried to get my hands at the font: http://starling.rinet.ru/downl.php?lan=en#soft But the EXEs aren't self extracting ZIPs as I expected, but real installers (or something else), and I don't have access to a Windows machine at the moment. I had the same problem on mac os x. I can send you the ttf files off-list if you are interested.
I'd appreciate that, please.
BTW if the fonts really are named "Palatino something" there may be trouble ahead, because Palatino is a trademark (that's why URW+ + names their version "Palladio"). I think the font is called Palatino Linostar. But I let the russians deal with the trademark problems.
Of course it's not your problem, but Hans is right: If you'd call a car "Daimler Bums" it would be a trademark infringement nevertheless... And I suspect they even took the code from the original Palatino fonts... Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
Henning Hraban Ramm wrote:
Of course it's not your problem, but Hans is right: If you'd call a car "Daimler Bums" it would be a trademark infringement nevertheless... And I suspect they even took the code from the original Palatino fonts...
so that font should be on the black list and an alternative should be used Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 19 Jan 2006, at 20:44, Hans Hagen wrote:
Henning Hraban Ramm wrote:
Of course it's not your problem, but Hans is right: If you'd call a car "Daimler Bums" it would be a trademark infringement nevertheless... And I suspect they even took the code from the original Palatino fonts...
so that font should be on the black list and an alternative should be used Hans
I am not very familiar with these things. Is there a way in which I can find out if there is reason that this font should be blacklisted. I have a version of fontlab on my computer. I have never before had reason to suspect the heritage of this font since it was also used in a web-based project by the Santa Fe institute of advanced studies. Sjoerd
Am 2006-01-19 um 21:51 schrieb sjoerd siebinga:
I have never before had reason to suspect the heritage of this font since it was also used in a web-based project by the Santa Fe institute of advanced studies.
Some academics don't seem to care about copyrights. (I did tell you more via PM.) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
On 1/18/06, sjoerd siebinga wrote:
On 18 Jan 2006, at 13:10, Mojca Miklavec wrote:
If the placement of the macron doesn't suit your font, you can redefine it and get rid of those \uchar-s.
What is the best way to redefine the accents (like macron, acute, etc.) to say a standard tex accent?
See enco-def.tex: \definecharacter Amacron {\buildtextaccent\textmacron A} This places the accent in the default way. But for example: \definecharacter Adotbelow {\buildtextbottomdot A} In enco-ini.tex: \def\buildtextbottomdot{\bottomaccent{.25ex}{0}{5}{\textbottomdot}} \def\buildtextmacron{\bottomaccent{.25ex}{0}{15}{\textmacron}} \def\buildtextgrave{\topaccent{0pt}{0}{15}{\textgrave}} You can fine-tune those three argument to suit you best. See also enco-acc.tex.
Is there a command to pick up certain utf-glyphs that aren't picked- up by context? See the ƃ ǖ in my example file.
I don't understand much abot the fonts and typescripts you are using, but if you are using pdfTeX, two criteria have to be met: 1. you have to have it in the font (not only in the ttf, but also in tfm I guess) - this seem to be rather complex font definitions; in case of usual "256-character" fonts you could get them with something similar to \getglyph{UnicodeRegular01}{\char131} (you can define the character name somewhere else, so that you don't need to say that explicitely) or % has to be included inside the proper encoding & typescript file % I doubt that this would suit your needs \definecharacter btopbar 131 But I don't know how this fits with your fonts. 2. If you have low-level access to proper glyphs described above, take a look at unic-001.tex (or enco-uc.tex, but I guess that the later is only used in XeTeX): \startunicodevector 1 \expandafter\strippedcsname \ifcase\numexpr#1\relax \Amacron \or ... \Zcaron \or \zcaron \or \slong \or % 127 \slong \else \unknownchar \or % could be \bstroke \unknownchar \or % could be \Bhook \unknownchar \or \unknownchar \or % this could be "your" \btopbar (ƃ) % (LATIN SMALL LETTER B WITH TOPBAR) % or some more appropriate name ... \uhorn \or ... \udiaeresismacron \or % ǖ LATIN SMALL LETTER U WITH DIAERESIS AND MACRON ... \else \unknownchar \fi \stopunicodevector And then \btopbar has to be defined in the "encoding" to result in the proper glyph. These slots were left undefined since nobody is currently using them. If you can "invent" appropriate names, plese consider contributing to the list. I collected some of the names (those that I was able to find) on http://pub.mojca.org/tex/enco/contextlist/contextnames.html (not all of them are present in unic-*). unic-*.tex, enco-uc.tex are not really sinchronized yet (in one file some names are defined which are not defined in the other one). For Chinese and Japanese some other mechanism is used which doesn't need those names (might be more appropriate for you as well?), but I don't know any more about it. Mojca
participants (4)
-
Hans Hagen
-
Henning Hraban Ramm
-
Mojca Miklavec
-
sjoerd siebinga