10.07.2015 Views

The microtype package

The microtype package

The microtype package

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

IMPLEMENTATION: Font setup 89\MT@is@letter\MT@max@char\MT@max@slot\ifMT@norest\MT@is@number2468 else2469 -- we dig into internal structure (should be avoided)2470 local function name _ to _ slot(name, unsafe)2471 if fonts then2472 local unicodes2473 if fonts.ids then --- legacy luaotfload2474 local tfmdata = fonts.ids[font.current()]2475 if not tfmdata then return end2476 unicodes = tfmdata.shared.otfdata.luatex.unicodes2477 else --- new location2478 local tfmdata = fonts.hashes.identifiers[font.current()]2479 if not tfmdata then return end2480 unicodes = tfmdata.resources.unicodes2481 end2482 local unicode = unicodes[name]2483 if unicode then --- does the ’or’ branch actually exist?2484 return type(unicode) == "number" and unicode or unicode[1]2485 end2486 end2487 end2488 <strong>microtype</strong>.name _ to _ slot = name _ to _ slot2489 end24902491 Input is a letter, a character or a number.Warning if resulting character or slot number is too large.2492 2493 \def\MT@max@char2494 {127 }2495 {1114111 }2496 \def\MT@max@slot2497 {255 }2498 {1114111 }2499 Test whether all of the string has been used up.2500 2501 \newif\ifMT@norest2502 \def\MT@is@letter#1#2\relax{%2503 \ifcat a\noexpand#1\relax2504 \edef\MT@char@{\number`#1}%2505 \ifx\\#2\\%2506 \MT@dinfo@nl{3}{> `\the\MT@toks’ is a letter (\MT@char@)}%2507 \else2508 \MT@norestfalse2509 \fi2510 \else2511 \ifcat !\noexpand#1\relax2512 \edef\MT@char@{\number`#1}%2513 \MT@dinfo@nl{3}{> `\the\MT@toks’ is a character (\MT@char@)}%2514 \ifx\\#2\\%2515 \ifnum\MT@char@ > \MT@max@char \MT@warn@ascii \fi2516 \else2517 \MT@norestfalse2518 \expandafter\MT@is@number#1#2\relax\relax2519 \fi2520 \fi2521 \fi2522 }Numbers may be specified as a three-digit decimal number (029), as a hexadecimalnumber (prefixed with ": "1D) or as a octal number (prefixed with ’: ’35). <strong>The</strong>ymust consist of at least three characters (including the prefix), that is, "F is not

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!