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

ttf2pt1.exe has stopped working #48

Closed
ghost opened this issue Aug 13, 2021 · 5 comments
Closed

ttf2pt1.exe has stopped working #48

ghost opened this issue Aug 13, 2021 · 5 comments

Comments

@ghost
Copy link

ghost commented Aug 13, 2021

When trying to load the dlookr package on a new machine, I am running into an error. Windows throws up a window that says "ttf2pt1.exe has stopped working". This pop-up can be closed with "Close the program", but then re-opens 3 more times before finishing loading the dlookr package.

See the attached screenshot:

image

Here is the complete log, note that the problem occurs after the Registering PDF & PostScript fonts with R for Viz line before completing after I close the pop-ups:

R version 4.0.2 (2020-06-22) -- "Taking Off Again"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library('dlookr')
Registering Windows fonts with R for Viz
Registering PDF & PostScript fonts with R for Viz
Imported Arial Narrow fonts.
Registering Windows fonts with R for Viz
Registering PDF & PostScript fonts with R for Viz

Attaching package: ‘dlookr’

The following object is masked from ‘package:base’:

    transform

Warning message:
package ‘dlookr’ was built under R version 4.0.5

Two questions:

  1. What do you suggest to resolve this problem?
  2. What downstream consequences might I face if I don't solve this problem?
@choonghyunryu
Copy link
Owner

@dee-L,

Hope your issue is resolved.
And, to answer your question:

  1. What do you suggest to resolve this problem?

Check the version of the Rttf2pt1 package by running the following command:
installed.packages()["Rttf2pt1", "Version"]
If the Rttf2pt1 version is earlier than 1.3.8, try loading dlookr after installing the 1.3.8 version.

The dlookr package loads fonts using the extrafont package.
However, there was a problem with the Rttf2pt1 package, which was recently registered with CRAN and used by the extrafont package.
The version of Rttf2pt1 that fixed the issue is 1.3.8.

  1. What downstream consequences might I face if I don't solve this problem?

The latest dlookr package uses Arial Narrow fonts for visualization.
If Rttf2pt1 fails to load the font, a problem occurs when executing dlookr's visualization function.

@ghost
Copy link
Author

ghost commented Aug 15, 2021

Thanks for the response.

I checked the Rttf2pt1 version, and it was 1.3.9. Nonetheless, I ran the following, but the error persists:

install.packages('Rttf2pt1')
install.packages('dlookr')
library('dlookr')

Since the error is persisting even after re-installing the latest versions of both packages, do you have any other suggestions?

@choonghyunryu
Copy link
Owner

@dee-L

Sorry.
dlookr was developed on the premise that Rttf2pt1 works normally.

In R, it is very difficult to link a specific program in the user's environment. Since each user's environment is different, when an error occurs, it is necessary to find the cause of the problem in the same environment.

I'm not a Rttf2pt1 developer, so I can't figure out what's causing the error in this program.
As in your case, there may be users who have errors in the Rttf2pt1 program, so I will implement a function that can replace Rttf2pt1 in the next version of dlookr.

In the next version I will try to make dlookr work without problems on your Windows.

choonghyunryu added a commit that referenced this issue Nov 20, 2021
…onts into the plot. For this method, the extrafont package was changed to the showtext package. (#48, #53)
@choonghyunryu
Copy link
Owner

@dee-L

Changed the way fonts are imported into the R environment to insert fonts into the plot. For this method, the extrafont package was changed to the showtext package. So dlookr no longer needs Rttf2pt1.

It has been reflected in the Github version, and is currently being submitted to CRAN for distribution.

The English font includes "Liberation Sans Narrow" and the Korean font includes "NanumSquare" in the package.
And I made google fonts available online. The English font "Roboto Condensed" and the Korean font "Noto Sans KR" were set to be usable.

@choonghyunryu
Copy link
Owner

@ghost

dlookr has replaced the functionality of the extrafont package with the showtext package. So now dlookr no longer uses Rttf2pt1 anymore. Therefore, this issue does not occur.

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

1 participant