With oven rack in middle position, preheat oven to 400 degrees F. Use butter to grease a 2-quart casserole dish (I used a square one, but you can use rectangle or oval, if you prefer!)
In a large bowl, combine the grated fontina and parmesan cheeses. Remove 1/3 of a cup to a separate bowl for later use.
Add heavy cream, garlic and thyme to large bowl of cheese and stir to mix. Season with salt and pepper.
Add potato slices and use hands to toss and make sure each slice is coated with the mixture, with no slices sticking together.
One handful at a time, pick up a stack of potatoes and place them in the prepared dish, on their sides (versus flat, cut-side down), on the outer edge of the dish until you've gone all the way around. Then repeat in the middle section of the dish, using up the remaining potatoes.
Pour the remaining cream and cheese mixture into the baking dish, about 2/3 full. I recommend putting your baking dish on a cookie sheet, in case there is any bubbling over of the filling. Cover with foil, and bake for 30 minutes. Remove foil and bake for 30 more minutes, until the tops are lightly golden brown. Top with reserved cheese mixture and bake for another 30 minutes, or until top is deep golden brown and crisp.
Remove from oven and allow to rest for a few minutes before serving.