Skip to content

Commit

Permalink
Merge pull request #166 from chhsiao1981/font-weight-for-double-color
Browse files Browse the repository at this point in the history
improving font-weight for double-color
  • Loading branch information
chhsiao1981 authored Dec 27, 2023
2 parents 500d6ea + 27a691d commit 7c05033
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/components/InitConsts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export default (props: Props) => {

let rect = ref.current.getBoundingClientRect()
let theStyle = getComputedStyle(ref.current)
console.log('InitConsts: width:', rect.width, 'height:', rect.height, 'fontSize:', theStyle.fontSize, 'fontFamily:', theStyle.fontFamily)
InitCONSTS(windowWidth, rect.height, isMobile, fontSize, scale, screenWidth)
let lineHeight = rect.height - 0.5
console.log('InitConsts: width:', rect.width, 'height:', rect.height, 'windowWidth:', windowWidth, 'lineHeight:', lineHeight, 'fontSize:', theStyle.fontSize, 'fontFamily:', theStyle.fontFamily)
InitCONSTS(windowWidth, lineHeight, isMobile, fontSize, scale, screenWidth)
setIsInitConsts(true)
}, [ref.current, isInitConsts])


return (<span ref={ref} className={styles['root']} style={style}></span>)
}
12 changes: 6 additions & 6 deletions src/components/cells/ContentRenderer.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@
z-index: -2; /* Draw below the selectable text */
}

.halves-group { /* Container for a .halves rune group */
/* Prevent .halves elements from being drawn below the background */
position: relative;
z-index: 1;
}

.rune {
white-space: pre;
height: 100%;
Expand All @@ -127,12 +133,6 @@
width: 100%;
}

.halves-group { /* Container for a .halves rune group */
/* Prevent .halves elements from being drawn below the background */
position: relative;
z-index: 2;
}

.calc {
color: rgba(0, 0, 0, 0);
background-color: rgba(0, 0, 0, 0);
Expand Down
1 change: 1 addition & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ body {
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-weight: 500;
}

code {
Expand Down

0 comments on commit 7c05033

Please sign in to comment.