Compare commits
2 Commits
af424d1baa
...
c9430ffdee
Author | SHA1 | Date |
---|---|---|
Lephenixnoir | c9430ffdee | |
Lephenixnoir | e0b952503b |
|
@ -1,5 +1,5 @@
|
|||
# Casio fx9860g library
|
||||
TARGET = libTeX-fx.a
|
||||
CFLAGS = -m3 -mb -D TEX_PLATFORM_FX9860G -D FX9860G -Os -ffreestanding
|
||||
CC = sh3eb-elf-gcc
|
||||
AR = sh3eb-elf-ar
|
||||
CC = $(TOOLCHAIN)-gcc
|
||||
AR = $(TOOLCHAIN)-ar
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Casio fxcg50 library
|
||||
TARGET = libTeX-cg.a
|
||||
CFLAGS = -m4-nofpu -mb -D TEX_PLATFORM_FXCG50 -D FXCG50 -Os -ffreestanding
|
||||
CC = sh4eb-elf-gcc
|
||||
AR = sh4eb-elf-ar
|
||||
CC = $(TOOLCHAIN)-gcc
|
||||
AR = $(TOOLCHAIN)-ar
|
||||
|
|
|
@ -60,8 +60,8 @@ fi
|
|||
|
||||
# Guess toolchains
|
||||
|
||||
[[ $platform == fx9860g && -z $toolchain ]] && toolchain=sh3eb-elf
|
||||
[[ $platform == fxcg50 && -z $toolchain ]] && toolchain=sh4eb-elf
|
||||
[[ $platform == fx9860g && -z $toolchain ]] && toolchain=sh-elf
|
||||
[[ $platform == fxcg50 && -z $toolchain ]] && toolchain=sh-elf
|
||||
|
||||
# Guess compiler paths
|
||||
|
||||
|
|
|
@ -31,6 +31,13 @@
|
|||
#define TEX_PRINT
|
||||
#endif
|
||||
|
||||
/* Switch to change parameters on fx-9860G / fx-CG 50. */
|
||||
#if defined(TEX_PLATFORM_FX9860G)
|
||||
#define TEX_FX(fx, cg) (fx)
|
||||
#elif defined(TEX_PLATFORM_FXCG50)
|
||||
#define TEX_FX(fx, cg) (cg)
|
||||
#endif
|
||||
|
||||
//---
|
||||
// Graphical settings
|
||||
// A few quirks that can be adjusted to your needs.
|
||||
|
@ -47,9 +54,13 @@
|
|||
/* Vertical spacing between fraction bar and operands */
|
||||
#define TEX_FRACTION_SPACING TEX_LAYOUT_SPACING
|
||||
|
||||
/* Vertical placement of subscripts and superscripts (relative to object) */
|
||||
#define TEX_SUBSCRIPT_ELEVATION 3
|
||||
#define TEX_SUPERSCRIPT_DEPTH 3
|
||||
/* Vertical placement of subscripts and superscripts (relative to object) when
|
||||
there is either only the subscript or only the superscript */
|
||||
#define TEX_SUBSCRIPT_EXCL_ELEVATION TEX_FX(3, 5)
|
||||
#define TEX_SUPERSCRIPT_EXCL_DEPTH TEX_FX(3, 5)
|
||||
/* Vertical placement of subscripts and superscripts when there's both */
|
||||
#define TEX_SUBSCRIPT_SHARED_ELEVATION TEX_FX(3, 3)
|
||||
#define TEX_SUPERSCRIPT_SHARED_DEPTH TEX_FX(3, 3)
|
||||
/* Horizontal spacing between object and subscripts and superscripts */
|
||||
#define TEX_SUBSCRIPT_SPACING TEX_LAYOUT_SPACING
|
||||
#define TEX_SUPERSCRIPT_SPACING TEX_LAYOUT_SPACING
|
||||
|
|
|
@ -146,7 +146,9 @@ static void chunk_layout_inline(struct chunk *chunk)
|
|||
|
||||
if(sub)
|
||||
{
|
||||
int elevation = TEX_SUBSCRIPT_ELEVATION;
|
||||
int elevation = sup
|
||||
? TEX_SUBSCRIPT_SHARED_ELEVATION
|
||||
: TEX_SUBSCRIPT_EXCL_ELEVATION;
|
||||
|
||||
sub->x = base->x + base->width + TEX_SUBSCRIPT_SPACING;
|
||||
sub->l = base->l + (base->height - base->line + sub->line -
|
||||
|
@ -157,7 +159,9 @@ static void chunk_layout_inline(struct chunk *chunk)
|
|||
}
|
||||
if(sup)
|
||||
{
|
||||
int depth = TEX_SUPERSCRIPT_DEPTH;
|
||||
int depth = sub
|
||||
? TEX_SUPERSCRIPT_SHARED_DEPTH
|
||||
: TEX_SUPERSCRIPT_EXCL_DEPTH;
|
||||
|
||||
sup->x = base->x + base->width + TEX_SUPERSCRIPT_SPACING;
|
||||
sup->l = base->l - (base->line + (sup->height - sup->line) -
|
||||
|
|
Loading…
Reference in New Issue