Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font not changing in TeXView widget despite specifying custom font in pubspec.yaml #192

Open
neeraj-pencill opened this issue Jul 28, 2024 · 2 comments

Comments

@neeraj-pencill
Copy link

I am encountering an issue where the custom font specified in the pubspec.yaml file is not being applied to the TeXView widget in my Flutter project. Despite following the necessary steps to include the custom font, the TeXView widget continues to use the default font.

@dakshvasudev
Copy link

Hi, I encountered the same issue

TeXView(
      renderingEngine: widget.renderingEngine,
      fonts: const [
        TeXViewFont(
          fontFamily: "inter",
          src: "assets/fonts/RobotoMono-Regular.ttf",
        )
      ],
      child: TeXViewDocument(
        styledHtml,
        style: const TeXViewStyle(
          padding: TeXViewPadding.all(8),
        ),
      ),
      loadingWidgetBuilder: (context) => const Center(
        child: AdaptiveLoading(),
      ),
    );

use the font property in the TexView itself

@Shahxad-Akram
Copy link
Owner

I can't reproduce the problem.

Please see if you've properly added fonts in the pubsepc.yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants