Rinse the chicken leg quarters under cool running water and pat dry with paper towels. Season all over with 3/4 teaspoon of the salt and 1/2 teaspoon of the black pepper.
Preheat the oven to 375 degrees F.
Heat the olive oil in a large ovenproof skillet and, when hot, add the chicken leg quarters and cook until browned on both sides, 10 to 12 minutes. Add the onions and garlic to the skillet and season with 1/4 teaspoon of the remaining salt and a pinch of the black pepper. Cook, stirring occasionally, until the onions have wilted and are lightly golden and the garlic cloves are caramelized slightly, 6 to 8 minutes. Add the flour and stir to combine. Cook, stirring, for 1 to 2 minutes. Add the chicken stock, rosemary and lemon juice to the skillet and season with the remaining salt and pepper. Return the chicken to the skillet and bring to a boil. Sprinkle the chicken with lemon zest. Cover the skillet and transfer to the oven. Cook for 30 minutes, or until chicken legs are cooked through and tender. Serve immediately, with some of the pan juices ladled over all. Serve with Basmati Rice.