Skip to content

Commit

Permalink
Fix issue where fonts may not always reset, fixes #157
Browse files Browse the repository at this point in the history
  • Loading branch information
jassmith committed Feb 10, 2022
1 parent fc17a67 commit 08387da
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/core/src/data-grid/data-grid-render.tsx
Expand Up @@ -990,12 +990,10 @@ function drawCells(
const hoverValue = hoverValues.find(hv => hv.item[0] === c.sourceIndex && hv.item[1] === row);

if (c.width > 10) {
if (theme !== colTheme) {
const cellFont = `${theme.baseFontStyle} ${theme.fontFamily}`;
if (cellFont !== font) {
ctx.font = cellFont;
font = cellFont;
}
const cellFont = `${theme.baseFontStyle} ${theme.fontFamily}`;
if (cellFont !== font) {
ctx.font = cellFont;
font = cellFont;
}
const drawResult = drawCell(
ctx,
Expand Down

0 comments on commit 08387da

Please sign in to comment.