can't find font .h files

I could pull my hair out. I had to go into my nicely running weather monitor and make a minor coding change. An hour later, I still can’t figure it out. I have run into this before with arduino. it seems that if i let a couple of months go by without using it (coding), i forget some stupid procedure, and hours go by.

this iteration i wanted to use a smaller font in tft display. i am using #include <Fonts/Dialog_plain_20.h>, and it works fine. But if i want to use #include <Fonts/Dialog_plain_10.h> also, crash, error, on upload.

so i tried to find where my Fonts/Dialog_plain_20.h font is, to see if 10.h is there too. But an hour of searching and googling and cussing, and i can’t find either on my hard drive. anywhere.

i just want to access the 10.h font. How do i do that ?

The file is in the TFT display library you're using. If you turn on "Show verbose output during compilation" in the IDE's File > Preferences dialog, compile a sketch that uses the library, and then check the contents of th eblack console pane at the bottom of the Arduino IDE window, you'll find the path to that library.

An alternative is to select any example sketch of the library from the File > Examples menu, then do a Sketch > Show sketch folder. That will open the folder of the example sketch in your file browser. That example is in a subfolder of the library folder, so you only need to navigate up a couple folder levels to get to the library's root folder.

Once you find the library, the file is likely under the subfolder of the library named "src".

thanks for the quick reply. but, when it is going badly, it goes badly.

in the verbose readout, it just said it could not find the folder or file specified, goodbye. how do i make it show the path to a file it DOES have ?

as far as the Sketch>Show sketch folder in an example, no luck. i don't see how it is going to find the plain_20.h font when it isn't used in the example. anyway, i can't get this method to work.

Try compiling for Dialog_plain_20.h and hopefully verbose mode will tell you where it is at least.

I know the frustration, believe me, if you can get it to where it compiles like before then start over but this time with a new clone of the program and instead of deleting prior stuff add your new stuff and see where it dies.

You probably updated some include file that no longer had what you were compiling with before. This happens to me frequently especially since I develop on a desktop and upload from a laptop. things get out of sync and it’s all crap till you figure it out again. pert suggested an idea to have all your include material in one folder then move the folder around separately. I will get that working as soon as I have this HTML issue sort out.

Did you look on the internet for the 10.h? Did you lose the one that was working, the 20 also?

pratto:
in the verbose readout, it just said it could not find the folder or file specified, goodbye.

Please post the sketch you compiled.


Please also post your original sketch that causes the “crash, error, on upload”.

If possible, you should always post code directly in the forum thread as text using code tags:

  • Do an Auto Format (Tools > Auto Format in the Arduino IDE or Ctrl + B in the Arduino Web Editor) on your code. This will make it easier for you to spot bugs and make it easier for us to read.
  • In the Arduino IDE or Arduino Web Editor, click on the window that contains your sketch code.
  • Press “Ctrl + A”. This will select all the text.
  • Press “Ctrl + C”. This will copy the selected text to the clipboard.
  • In a forum reply here, click the “Reply” button.
  • click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the sketch between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.
  • Repeat the above process if your sketch has multiple tabs.

This will make it easy for anyone to look at it, which will increase the likelihood of you getting help.

If the sketch is longer than the 9000 characters maximum allowed by the forum, then it’s OK to add it as an attachment. After clicking the “Reply” button, you will see an “Attachments and other settings” link that will allow you to make the attachment.

When your code requires a library that’s not included with the Arduino IDE please post a link (using the chain links icon on the forum toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.


Please also post the full output from this “crash, error, on upload”.

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link that will allow you to make the attachment.


With that information, I’ll be able to provide you with detailed instructions you’ll be able to follow to find this file.

Thank you all for trying to help me. as aggravating as the problem has been, your attempted assistance has been heartening. but i gave up, and won't make the change. i found quite a few .h files in arduino folders, but none that are referenced in my code. and i wrote the code, i didn't just copy it. at one time i knew (more or less) what i was doing. but it seems like i let too much time pass, about 6 months, since i wrote the section dealing with fonts.

I'm sorry we weren't able to help you achieve your goal in the end, but it's true that sometimes you have to make the decision to cut your losses and move on to more productive pursuits.

Perhaps you'll still benefit from the process by gaining new appreciation for the importance of documentation. I know I'm often very grateful to my past self when I discover some helpful comments or a readme in a project I did when returning to it after an absence of months or years. I'm also often cursing my past self when I lose an hour figuring out something that would have taken me a minute to document back when I went through that process the first time.

I couldn't agree more. But regardless of this last hiccup, I have a beautifully working, large color display, weather station showing wind speed/direction, max windspeed for the last 24 hrs., temp, min. temp for the last 24 hrs., house water pressure, min. water pressure for the last 24 hrs., and touchscreen charts for all three.

And at every new step (almost), I was at a loss and got on this forum for help, and it was always forthcoming. This is what I call a helpful forum.